I'm rather new to Access and I've been trying to get something to work and countless searches have provided nothing that I can use.
I'm trying to set buttons as numbers on one form and then checking another form to see if those buttons were pressed so it will set RecordSource.
Button Form:
DoCmd.OpenForm "LRU Data", acNormal, , , acFormAdd
intLRU = 1
Next Form:
If intLRU = 1 Then Me.RecordSource = AFT
Doesn't work.
I also tried using the button to set a hidden textbox:
Me.Number = 1
DoCmd.OpenForm "LRU Data", acNormal, , , acFormAdd
Next Form:
If Forms!LRUChoices.Number.Text = 1 Then Me.RecordSource = AFT
And I get an error: "You can't reference a property or method for a control unless the control has the focus". I've seen examples online but they quite frankly make no sense.
Any help would be great!
I'm trying to set buttons as numbers on one form and then checking another form to see if those buttons were pressed so it will set RecordSource.
Button Form:
DoCmd.OpenForm "LRU Data", acNormal, , , acFormAdd
intLRU = 1
Next Form:
If intLRU = 1 Then Me.RecordSource = AFT
Doesn't work.
I also tried using the button to set a hidden textbox:
Me.Number = 1
DoCmd.OpenForm "LRU Data", acNormal, , , acFormAdd
Next Form:
If Forms!LRUChoices.Number.Text = 1 Then Me.RecordSource = AFT
And I get an error: "You can't reference a property or method for a control unless the control has the focus". I've seen examples online but they quite frankly make no sense.
Any help would be great!