Microsoft
Software
Hardware
Network
Question : Microsoft Access 2007 - Change Form Recordsource While Form is Open
Presently, the user enters information into an Access Form (the form data is obviously saved to a table). The user indicates if there is more data to enter in any one of the other 30 tables. If there is, the current form closes and the indicated form opens (with the appropriate table as the recordsouce).
But....is there a way to change the recordsource of the form so that one form could function as the front end for all tables? (assume that ALL tables have the exact same fields and will display the exact same type data)
I have tried the following code within an 'onclick' event...
Forms!CurrentForm.recordso
urce = "Select * From NextTable"
DoCmd.Save acForm, "CurrentForm"
Forms!CurrentForm.requery
Forms!CurrentForm.refresh
And have also tried....
Forms!CurrentForm.recordso
urce = "Select * From NextTable"
DoCmd.Close acForm, "CurrentForm", acSaveYes
Neither pieces of coding work as the recordsource is not changed upon refreshing the form or re-opening it.
Does anyone have any ideas that do not include having to first close the form in order to change the recordsource?
Answer : Microsoft Access 2007 - Change Form Recordsource While Form is Open
see this sample db
Random Solutions
VMware FT for Intel Xeon 5650 Chipset on Dell R610
insert record and check for existing email address
Exchange 2003 does not work after reinstalling SMTP service on SBS 2003 Server
How do I charge for a job?
Cisco 2950 Vlan for Voice
GMT to EDT
get-wmiobject error - Powershell
Cisco VPN client for Windows, use both RSA SecurID soft token and hard token
Vista Ultimate clone from HP to HP
HTC Touch 3G: How can I really upgrade WM6.1 to WM6.5 and/or porting to latest Android?