Passing unbound form data to another form

majoral

New member
Local time
Today, 14:24
Joined
Aug 18, 2022
Messages
7
Hi

Just wondering if it is possible to pass an unbound form data field to another form? I have a database with an unbound form that requests a start and end date which are then referenced in subsequent queries. This works well but when I display the results of my query I would like to also show the beginning and end date on the form. I can't seem to be able reference these using a text box using the field reference in the control source as all I get is #error!

Does anyone know if this possible? Possibly quite simple but still a newbee with access although learning a lot due to the helpful peopple on this site

Thanks
 
Lookup the use of OpenArgs when opening a form.
 
There are many ways to do this.
1. Use open args like @Gasman. You would have to pass the values as a delimited string and then split the string into its parts
2. Have the called form/report reference the controls as the control source of the controls in the called form as @Eugene-LS showed.
3. Have the calling form pass in code the values from the calling form
4. Have the called form read the values from the calling form in vba and assign to the controls
5. Use tempvars and have the calling form set them and the called form to read them
 
thanks folks - I'll take a look at these and see how I get on
 
thanks again - got that working now - all was missing was an equal sign at the start of the control statement :-)
 

Users who are viewing this thread

Back
Top Bottom