I am creating a data-entry form with several steps to make sure the user puts things in a particular way and I'm having some issues I am hoping somebody can help with.
1. Form # 1 - fromTruckCollection
Unbound form. Requires the user to enter 3 pieces of information and will not let them move to the data-entry table without this information. This form works perfect.
1. Truck Number
2. Route Fill ID
3. Collection Date
I get the three things I need form the user, above, then the form opens the new form and passes the information to the new form (frmCollection) as a string.
2. Form 2 - frmCollection
I use OpenArgs to take the string from the first form apart into usable information I need for my data entry in this form.
Private Sub Form_Open(Cancel as Integer)
Dim Truck, WeekDay, CollectionDate
Truck = Split(Me.OpenArgs, ";")(0)
WeekDay = Split(Me.OpenArgs, ";")(1)
CollectionDate = Split(Me.OpenArgs, ";")(2)
DateValue(CollectionDate)
End Sub
I know the information is coming across correctly because I'm able to use Truck and WeekDay to run a query on open that pulls up all the correct information the end-user needs for data entry.
Here's the issue. The CollectionDate is not use in frmCollection. It's actually a value that I need to save in the subform frmCollectionsubform.
Because CollectionDate is not an actual bound field on frmCollection I cannot seem to get the DateValue of Collection Date from the Parent form, frmCollection, to the Subform, frmCollectionsubform.
Actually, I take that back. I was able to get it to work one time, but it didn't actually save the value in the subform, I was simply displaying what was in the very first form, frmTruckCollection. However, I really need to save the date in the subform. The reason I'm trying to do this is because the exact same date gets entered for all the data-entry the user is doing. It could be 32 records, it could be 15. So I'm trying to save the data-entry use some time.
I hope I've explained this correctly. I appreciate any help anyone can offer. Thank you.