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
|
|||
|
|||
Have a form populate a field from a query
I am trying to create a shortcut for a scheduling database. The users
need to be presented with a drop down box that gives them a list of last names. That I have done. When the user clicks on the OK button, I need it to populate a field and apply a filter. The problem I have run into is getting the form to open with the "Filter by Form" applied then have the result from the selection box be populated in the last name field then apply the filter so we can get the result. If all I wanted was a report, that is easy and I have done that, but I want the form to appear with the filter run and displaying results. I would think the code would be the same up to the point of DoCmd.OpenReport and swap that with DoCmd.OpenForm. That even works but getting the form to open with Filter by Form inplace, take the data from the query then apply the filter. I have used the examples from fontstuff.com for Customizing Access Parameter Queries (BTW the tip works like a charm for a date range search report I wanted) but not sure if there is VB code that can open a form, apply Form by filter, insert my query result, then apply the filter. Any suggestions? TIA Guy |
Thread Tools | |
Display Modes | |
|
|