chrisjames25
Registered User.
- Local time
- Today, 15:50
- Joined
- Dec 1, 2014
- Messages
- 404
Hi All. Been pulling my hair out today and just cant see what doing wrong. I have a mainfomr with a subform.
THe subform is populated once i click a command button in the mainform and the subform is based on a qry that looks at an input in a textbox on the mainform.
SO far so good. I open the form, i choose some sales data and press a command button and the data neatly populates. Perfect.
Once finished with the data I click another commnad button which clears the txtbox from the mainform and refreshes the subform.
It is at this point that i have the problem. I want the subform to now reset to no data but instead of no data I get rows of controls saying #Name? instead. Image attached.
I beleive it may be down to my query design and in particular the way i look at the control from the mainform but im not 100% sure.
Attached is also a copy of what the query design looks like.
As ever any help massively appreciated. Currently having to close and reopen form everytime which isnt ideally and user friendly.
THe subform is populated once i click a command button in the mainform and the subform is based on a qry that looks at an input in a textbox on the mainform.
SO far so good. I open the form, i choose some sales data and press a command button and the data neatly populates. Perfect.
Once finished with the data I click another commnad button which clears the txtbox from the mainform and refreshes the subform.
Code:
Me.Txt_SalesOrderNo = ""
'Me.Txt_SalesOrderNo.Value = vbNullString
Me.Frm_SubPotting.Requery
It is at this point that i have the problem. I want the subform to now reset to no data but instead of no data I get rows of controls saying #Name? instead. Image attached.
I beleive it may be down to my query design and in particular the way i look at the control from the mainform but im not 100% sure.
Attached is also a copy of what the query design looks like.
As ever any help massively appreciated. Currently having to close and reopen form everytime which isnt ideally and user friendly.