A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Select from a combo box, go to related record in another form



 
 
Thread Tools Display Modes
  #1  
Old October 23rd, 2007, 08:21 PM posted to microsoft.public.access.forms
Tammy
external usenet poster
 
Posts: 534
Default Select from a combo box, go to related record in another form

Hi,

I've been struggling with this. It seems to be simple enough, but I cannot
get my macro to work.

I would like to have one form with just a combo box. The combo box contains
a user ID and the First/Last names, so that when a user selects from the
combo box, they are sure to select the correct person. After selecting from
the combo box, I'd like to have a different form open to the record selected
from the combo box. I'd like just that record to be displayed.

I created a macro that opens the other form (OpenForm), and input an
expression for the "Where Condition": [ID]=[Forms]![MyFormName]![ID]; this
macro was added to the "OnChange" event in the combo box properties.

When I select from the combo box, the other form opens, but it does not go
to the record selected. It goes to the a blank new record.

Where am I going wrong? I'm not a prgrammer, so VBA isn't an option. (unless
it was fairly easy to understand)

I've read a lot of the posted discussions and tried a few of those
suggestions out, but they don't seem to work for what I want to do. I know
this cannot be that hard. Any suggestions?
  #2  
Old October 23rd, 2007, 09:12 PM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Select from a combo box, go to related record in another form

Tammy

What purpose does having the second form serve? Why not have the form in
which the combobox sits serve as the form in which you display the "found"
record?

An unbound combobox in the header lets you pick "the correct person".

You can create a query that gets "person" data and uses, as a selection
criterion, the value of the form's combo box!

Will this get you what you need?

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Tammy" wrote in message
news
Hi,

I've been struggling with this. It seems to be simple enough, but I cannot
get my macro to work.

I would like to have one form with just a combo box. The combo box
contains
a user ID and the First/Last names, so that when a user selects from the
combo box, they are sure to select the correct person. After selecting
from
the combo box, I'd like to have a different form open to the record
selected
from the combo box. I'd like just that record to be displayed.

I created a macro that opens the other form (OpenForm), and input an
expression for the "Where Condition": [ID]=[Forms]![MyFormName]![ID]; this
macro was added to the "OnChange" event in the combo box properties.

When I select from the combo box, the other form opens, but it does not go
to the record selected. It goes to the a blank new record.

Where am I going wrong? I'm not a prgrammer, so VBA isn't an option.
(unless
it was fairly easy to understand)

I've read a lot of the posted discussions and tried a few of those
suggestions out, but they don't seem to work for what I want to do. I know
this cannot be that hard. Any suggestions?



  #3  
Old October 23rd, 2007, 09:34 PM posted to microsoft.public.access.forms
Tammy
external usenet poster
 
Posts: 534
Default Select from a combo box, go to related record in another form

Hi Jeff,

That is exactly what I would do - use the same form. However, I have a user
who would like the two separate forms. I am going to try and convince her to
just use the one form.

Thanks very much for responding!

"Jeff Boyce" wrote:

Tammy

What purpose does having the second form serve? Why not have the form in
which the combobox sits serve as the form in which you display the "found"
record?

An unbound combobox in the header lets you pick "the correct person".

You can create a query that gets "person" data and uses, as a selection
criterion, the value of the form's combo box!

Will this get you what you need?

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Tammy" wrote in message
news
Hi,

I've been struggling with this. It seems to be simple enough, but I cannot
get my macro to work.

I would like to have one form with just a combo box. The combo box
contains
a user ID and the First/Last names, so that when a user selects from the
combo box, they are sure to select the correct person. After selecting
from
the combo box, I'd like to have a different form open to the record
selected
from the combo box. I'd like just that record to be displayed.

I created a macro that opens the other form (OpenForm), and input an
expression for the "Where Condition": [ID]=[Forms]![MyFormName]![ID]; this
macro was added to the "OnChange" event in the combo box properties.

When I select from the combo box, the other form opens, but it does not go
to the record selected. It goes to the a blank new record.

Where am I going wrong? I'm not a prgrammer, so VBA isn't an option.
(unless
it was fairly easy to understand)

I've read a lot of the posted discussions and tried a few of those
suggestions out, but they don't seem to work for what I want to do. I know
this cannot be that hard. Any suggestions?




  #4  
Old October 23rd, 2007, 09:54 PM posted to microsoft.public.access.forms
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default Select from a combo box, go to related record in another form

Tammy

Perhaps you could ask the same question...

If the first form only holds a combobox, why? How does having that mostly
empty form help *her* do what she wants to do?

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Tammy" wrote in message
...
Hi Jeff,

That is exactly what I would do - use the same form. However, I have a
user
who would like the two separate forms. I am going to try and convince her
to
just use the one form.

Thanks very much for responding!

"Jeff Boyce" wrote:

Tammy

What purpose does having the second form serve? Why not have the form in
which the combobox sits serve as the form in which you display the
"found"
record?

An unbound combobox in the header lets you pick "the correct person".

You can create a query that gets "person" data and uses, as a selection
criterion, the value of the form's combo box!

Will this get you what you need?

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Tammy" wrote in message
news
Hi,

I've been struggling with this. It seems to be simple enough, but I
cannot
get my macro to work.

I would like to have one form with just a combo box. The combo box
contains
a user ID and the First/Last names, so that when a user selects from
the
combo box, they are sure to select the correct person. After selecting
from
the combo box, I'd like to have a different form open to the record
selected
from the combo box. I'd like just that record to be displayed.

I created a macro that opens the other form (OpenForm), and input an
expression for the "Where Condition": [ID]=[Forms]![MyFormName]![ID];
this
macro was added to the "OnChange" event in the combo box properties.

When I select from the combo box, the other form opens, but it does not
go
to the record selected. It goes to the a blank new record.

Where am I going wrong? I'm not a prgrammer, so VBA isn't an option.
(unless
it was fairly easy to understand)

I've read a lot of the posted discussions and tried a few of those
suggestions out, but they don't seem to work for what I want to do. I
know
this cannot be that hard. Any suggestions?






  #5  
Old October 24th, 2007, 09:19 PM posted to microsoft.public.access.forms
Tammy
external usenet poster
 
Posts: 534
Default Select from a combo box, go to related record in another form

Thanks, again, Jeff. I've added the combo box to the header section of the
form and it works great. Have forwarded it to my user, so we'll see if she is
happy with it. Thanks for responding so quickly.

"Jeff Boyce" wrote:

Tammy

Perhaps you could ask the same question...

If the first form only holds a combobox, why? How does having that mostly
empty form help *her* do what she wants to do?

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Tammy" wrote in message
...
Hi Jeff,

That is exactly what I would do - use the same form. However, I have a
user
who would like the two separate forms. I am going to try and convince her
to
just use the one form.

Thanks very much for responding!

"Jeff Boyce" wrote:

Tammy

What purpose does having the second form serve? Why not have the form in
which the combobox sits serve as the form in which you display the
"found"
record?

An unbound combobox in the header lets you pick "the correct person".

You can create a query that gets "person" data and uses, as a selection
criterion, the value of the form's combo box!

Will this get you what you need?

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Tammy" wrote in message
news Hi,

I've been struggling with this. It seems to be simple enough, but I
cannot
get my macro to work.

I would like to have one form with just a combo box. The combo box
contains
a user ID and the First/Last names, so that when a user selects from
the
combo box, they are sure to select the correct person. After selecting
from
the combo box, I'd like to have a different form open to the record
selected
from the combo box. I'd like just that record to be displayed.

I created a macro that opens the other form (OpenForm), and input an
expression for the "Where Condition": [ID]=[Forms]![MyFormName]![ID];
this
macro was added to the "OnChange" event in the combo box properties.

When I select from the combo box, the other form opens, but it does not
go
to the record selected. It goes to the a blank new record.

Where am I going wrong? I'm not a prgrammer, so VBA isn't an option.
(unless
it was fairly easy to understand)

I've read a lot of the posted discussions and tried a few of those
suggestions out, but they don't seem to work for what I want to do. I
know
this cannot be that hard. Any suggestions?






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:48 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.