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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|