Hello there,
I'm trying to call a subroutine in one form from a sub in another, and passing it a simple integer in the process. Bit of a newb at this, if it was a sub from the same form then I could just write the name of the subroutine and it would be quite happy... i.e.:
[random code]
subname
[random code]
obviously it tells me it can't find the subroutine though as it's under a different object class (another form). I can't figure it out!
Here's the important bits with the rest chopped out:
It's probably something really simple, but any help greatly appreciated 'cuz I can't suss it at all
I'm trying to call a subroutine in one form from a sub in another, and passing it a simple integer in the process. Bit of a newb at this, if it was a sub from the same form then I could just write the name of the subroutine and it would be quite happy... i.e.:
[random code]
subname
[random code]
obviously it tells me it can't find the subroutine though as it's under a different object class (another form). I can't figure it out!
Here's the important bits with the rest chopped out:
Code:
Private Sub Invoice()
Dim BookingNo As Integer
BookingNo = Me!PackageID.Value
'The form that must be opened:
DoCmd.OpenForm "frmHandlingInvoices"
'The code that must run a sub belonging to that form:
'... and pass BookingNo to that sub.
????
It's probably something really simple, but any help greatly appreciated 'cuz I can't suss it at all