Unfortunately I'm very new to both Access and VBA so I'm having some trouble getting this setup.
On a form I have multiple buttons. When I push one of those buttons I'd like it to open the new (reuseable) form I've created and have the recordsource be that button's caption (there's a table for each button). Initially I made a form for every table/button but I came across reusable forms and I think that'd be the way to go.
Syntax destroys me since I'm so new to this. I was trying to create variables and having the form's recordsource set with that variable.
Forms!AFT.RecordSource = "LRU"
Where "LRU" is set by which button was pressed. I get the run-time error of: 'LRU' specified on this form or report does not exist.
I have also tried: LRU = "SELECT * FROM AFT "
On a form I have multiple buttons. When I push one of those buttons I'd like it to open the new (reuseable) form I've created and have the recordsource be that button's caption (there's a table for each button). Initially I made a form for every table/button but I came across reusable forms and I think that'd be the way to go.
Syntax destroys me since I'm so new to this. I was trying to create variables and having the form's recordsource set with that variable.
Forms!AFT.RecordSource = "LRU"
Where "LRU" is set by which button was pressed. I get the run-time error of: 'LRU' specified on this form or report does not exist.
I have also tried: LRU = "SELECT * FROM AFT "
Last edited: