chobo321321
Registered User.
- Local time
- Today, 08:27
- Joined
- Dec 19, 2004
- Messages
- 53
Hi, I'm having a hard time setting the recordsource in a subform dynamically. here's what I have
Main Form code:
The debug statement displays "EXEC spProductList 4", etc.., so I'm not sure why I don't see it in the recordsource.
When I run the main form and click the listbox record (lstOrder) to give the stored procedure a new value, nothing displays in the subform. I then go to design view and check the subforms recordsource, and it is blank. Does anyone have any ideas on why the recordsource is not being set? Any help is appreciated.
Main Form code:
Code:
Public Sub Form_Current()
Me.s_frmPurchaseOrder.Form.RecordSource = "EXEC spProductList " & Me!lstOrder
Debug.Print s_frmPurchaseOrder.Form.RecordSource
End Sub
When I run the main form and click the listbox record (lstOrder) to give the stored procedure a new value, nothing displays in the subform. I then go to design view and check the subforms recordsource, and it is blank. Does anyone have any ideas on why the recordsource is not being set? Any help is appreciated.