jonnywakey
Registered User.
- Local time
- Today, 22:39
- Joined
- Feb 2, 2009
- Messages
- 33
Hi All
I have a form "Disposition" which has a field called "JobID", the format of the JobID field is prefixed with "XXX-XXX-"000 and is an autonumber field resulting in XXX-XXX-001 in the field.
I am trying to use the OpenArgs function to pass this value to a field on a form called "frmReports", I have the following code behind a click event on cmd button on form "Disposition":-
Private Sub Command156_Click()
DoCmd.OpenForm "frmResults", , , , , , Me.JobID
End Sub
On the "frmResults" form on load event I have the following code:-
Private Sub Form_Load()
Me.Lab_Ref_No = Me.OpenArgs
End Sub
The Lab_Ref_No field = 1, is there any way of copying the format across to force this field to read XXX-XXX-001
Thanks in advance
Jonny
I have a form "Disposition" which has a field called "JobID", the format of the JobID field is prefixed with "XXX-XXX-"000 and is an autonumber field resulting in XXX-XXX-001 in the field.
I am trying to use the OpenArgs function to pass this value to a field on a form called "frmReports", I have the following code behind a click event on cmd button on form "Disposition":-
Private Sub Command156_Click()
DoCmd.OpenForm "frmResults", , , , , , Me.JobID
End Sub
On the "frmResults" form on load event I have the following code:-
Private Sub Form_Load()
Me.Lab_Ref_No = Me.OpenArgs
End Sub
The Lab_Ref_No field = 1, is there any way of copying the format across to force this field to read XXX-XXX-001
Thanks in advance
Jonny