this function calls a form, that requires a number to be entered. its doing that here.. however, its arriving at the
messagebox, but ofc,, has no number to work with, because the user hasn't selected one yet.
Whats the best way, of returning to the code, but only when the user has either a) selected a number or b) cancelled the operation (there is a button on the form, for this)
example code.
Code: Select all
Private Sub Command3_Click()
Call NumberBox(2)
...
...
...
msg box 'You Selected number '' & Mynumber
...
... more code
Code: Select all
Function NumberBox(X As Integer)
' this opens up a number box to select a number. X being the number of digits.
MyNumber = 0
DoCmd.OpenForm "Inputweek", acNormal
End Function