Unanswered: Multiple poup pickers with only one form
Can anyone help?
I need to have a pop up, and send a number back to a textBox depending on which button is clicked in the popup. I can do this, but now I am struggling with how to only use one form popup to allocate these (there are 12 in total).
I tried passing the refering name by putting it in quotes or not putting it in quotes, but it didn't work correctly.
This is my starting point:
Private Sub AA1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "LevelPicker"
DoCmd.OpenForm stDocName, , , stLinkCriteria
'On the Secondary Form (popup):
Dim ReferingBox As String
Dim CompleteReferer As String
Private Sub Y710_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Forms![Pupils]![Grade1] = 10 ' This is the Syntax I am after
Value1 is defined as a global variable elsewhere and works fine.
So I need some way of stringing that all together and then assigning the value to the box rather than having to assign it as above.
I have seen other examples, but they don't seem to work in this instance.
But how do I use that CompleteReferer from clicking the button?
I need to do the equivelant of:
CompleteReferer = 10
Or whatever it is. Only CompleteReferer needs to look like the contol on the first form. Obviously the above would redefine the variable and not the contents of the box.