How To : OpenArg

Sep 29, 2005

Is there a way (other than using Global Variables) to pass multiple OpenArgs to a subsequent form?

For instance.... we have 3 different shifts listed (1,2,3) at my workplace... and when a supervisor runs a report from the startup form, would need to pass a date AND the shift number to the resulting form.

i.e.,

DoCmd.OpenForm "Performance Stats",,,,,OpenArgs:dteDate=txtStartDate : intShift=txtShift, etc, etc.

View Replies


ADVERTISEMENT

Passing OpenArg To Listbox On Other Form

Aug 11, 2011

On the first form I have a button with the following OnClick event :

Private Sub Rispondi_Click()
acbReceiveMail
On Error GoTo Err_Rispondi_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmSendMail"

[Code] ....

On the form opened upon click ("frmSendMail") I am trying to populate the "cboTo" combobox with the "txtFrom" value from first form. In the OnLoad event I have written :

Private Sub Form_Load()
Me.cboTo = Me.OpenArgs
End Sub

Anyway after clicking the button that should open "frmSendMail" I get a popup saying : "An expression you entered is the wrong data type for one of the arguments" (run-time error '2498') ....

View 7 Replies View Related

Forms :: How To Stop OpenArg Code When Field Is Already Populated

Sep 4, 2013

I have an order form that auto-populates details from the customer table into adderss and contact controls. But I don't want it to auto-populate when the underlying order table already has data in the related fields. Here is the code I use on Load form event...

======
Private Sub Form_Load()
'Use this version if the ID is a number
Dim x As Variant
Dim strControl As String
Dim lngID As Long
'If parameters exist, use them
If Len(Me.OpenArgs) > 0 Then

[Code] ....

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved