Reputation: 409
I have an MS Access form called service that should contain a button (Open) that opens form payment.
The payment form contains a service id field which should be set automatically from the record form service where I pressed open.
How can I make it in Access?
Upvotes: 0
Views: 4475
Reputation: 55806
That could be:
Dim FormName As String
Dim ServiceId As Long
FormName = "Payment"
ServiceId = Me!ServiceId.Value ' get value of ServiceId to pass from current form.
DoCmd.OpenForm FormName
Forms(FormName)!ServiceId.Value = ServiceId
Upvotes: 2