nosferatu26
Registered User.
- Local time
- Today, 04:05
- Joined
- Jul 13, 2015
- Messages
- 57
hello,
I have a bounded formA controlled by a listbox. Everytime I select an item in the list box the after update event is called and I use the following code to update to the selected record:
then I just requery all the other controls within FormA and everything has been running smooth that way.
Now, I have added a popup form, FormB, to assist the user in searching/filtering out items within the original listbox of formA. I didn't do this all on the original form due to the lack of available space.
FormB lets the user filter out the list box and then they can select the desired item in a replica listbox within FormB when their criteria is met. When this selection happens, Ideally I would like FormA to be getting updated based on the selection from within the FormB listbox. To do this, I have been doing something like this for the FormB listbox afterupdate event:
The commented out lines throw 'action not available for object' errors.
The first two lines actually do update the listbox of FormA but the rest of the fields in the form don't update because the form is still bounded to the previous selection of listboxA. I was hoping to just change the selection with vba and then call the afterupdate event of the other form, essentially mimicking a user manually clicking that record; which would call afterupdate. Unfortunately I haven't been having any luck.
This was difficult to articulate, hopefully it isn't worded too poorly. If anyone can help me update the bounded ID as well as the listbox then I would greatly appreciate it!
I have a bounded formA controlled by a listbox. Everytime I select an item in the list box the after update event is called and I use the following code to update to the selected record:
Code:
DoCmd.SearchForRecord , "", acFirst, "[Design_Change_Item_ID] = " & Me.FormAListbox
Now, I have added a popup form, FormB, to assist the user in searching/filtering out items within the original listbox of formA. I didn't do this all on the original form due to the lack of available space.
FormB lets the user filter out the list box and then they can select the desired item in a replica listbox within FormB when their criteria is met. When this selection happens, Ideally I would like FormA to be getting updated based on the selection from within the FormB listbox. To do this, I have been doing something like this for the FormB listbox afterupdate event:
Code:
Forms!FormA.Form!crList = Me.crList
Forms!FormA.Form!changeList.Requery
'Forms!FormA!SBFM_changeRequest.Refresh
'Call Forms.FormA.Form.crList_AfterUpdate
The first two lines actually do update the listbox of FormA but the rest of the fields in the form don't update because the form is still bounded to the previous selection of listboxA. I was hoping to just change the selection with vba and then call the afterupdate event of the other form, essentially mimicking a user manually clicking that record; which would call afterupdate. Unfortunately I haven't been having any luck.
This was difficult to articulate, hopefully it isn't worded too poorly. If anyone can help me update the bounded ID as well as the listbox then I would greatly appreciate it!