D
Dave Elliott
I have a form named Customers where I want to be able to open another form
named TimeCards with the data linked, that is create a new record, i.e.
TimeCard with the customer data inputted for me.
The below code is not working. The TimeCard form opens to the first record,
no filters.
Also sometimes the TimeCards form is open the same time as the customers
form.
I get a error message saying the object o isnt open.
NameA is the field that will contain the customer on TimeCards form.It is a
lookup field and will fill in the rest after tabbing out of field. Any
Suggestions? Thanks...
On Error GoTo Err_Command17_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "TimeCards"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Forms![TimeCards]![NameA] = Forms![Customers]![Customers]
DoCmd.GoToRecord , NewRecord
Forms![TimeCards]![Employee] = Forms![Customers]![Employee]
DoCmd.Close acForm, Me.Name
--
---------------------------------------------------------------------
This email and any files transmitted with it from Dave Elliott are
confidential and intended solely for the
use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the
sender.
All Mail is pre-scanned with Norton Antivirus 2004 for your protection.
http://[email protected]
named TimeCards with the data linked, that is create a new record, i.e.
TimeCard with the customer data inputted for me.
The below code is not working. The TimeCard form opens to the first record,
no filters.
Also sometimes the TimeCards form is open the same time as the customers
form.
I get a error message saying the object o isnt open.
NameA is the field that will contain the customer on TimeCards form.It is a
lookup field and will fill in the rest after tabbing out of field. Any
Suggestions? Thanks...
On Error GoTo Err_Command17_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "TimeCards"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Forms![TimeCards]![NameA] = Forms![Customers]![Customers]
DoCmd.GoToRecord , NewRecord
Forms![TimeCards]![Employee] = Forms![Customers]![Employee]
DoCmd.Close acForm, Me.Name
--
---------------------------------------------------------------------
This email and any files transmitted with it from Dave Elliott are
confidential and intended solely for the
use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the
sender.
All Mail is pre-scanned with Norton Antivirus 2004 for your protection.
http://[email protected]