Help with a form recordsource problem
Posted on 2006-06-21
I have a 2 part new data entry form. On the first form, unbound, the user enters in the PONumber, Vendor, etc. and clicks continue. This runs an insert query to add the data to the main table. I also added some code to store the PONumber in a module to be used as the record source criteria of the second form. The final bit of code for my continue button is this:
mdlDatePicker.SetID = txtPurchaseID.Value
stDocName = "frmNewPOStep2"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.Close acForm, "frmNewPOStep1"
Then the code in my module is this:
Public Property Get ID() As Integer
ID = intID
Public Property Let SetID(x As Integer)
intID = x
And then my query that's used for my recordsource on the second form is this:
If I run the query by itself, it gives me the correct record information, but when I go through the new order process and go to the second form, no information is being pulled and my bound textboxes aren't showing any data. I'm stuck as how to fix this. Thanks for any help.