Hi,
I am having a problem referencing a field in order to filter my listbox.
I'm been driving myself crazy with possible solutions and nothing works yet.
Please assist if you can and i will do my best to be articulate in what i need and currenty have....
TO start,
This is a form with a tab control (which should be irrelevant to my knowledge as far as syntax).
The main form uses recordsource tblClients which has a field Acct.
this Acct field is what i need to reference one way or another at a later point.
tblClients is recordsource for frmBillToShipToNew
On frmBillToShipToNew there is a subform named frmSamples which source is tblSamples also which has a field Acct to join them and id be fine if i could reference this Acct field as well but have not been able to see either.
Where i am not able to see or reference them is in a list box i created on my frmSamples form.
The listbox source is tblSamples as well just like the subform.
The listbox populates with all samples ever created however i want to filter the list to which ever account (Acct) record i am currently on.
no matter what i try whether it be vba code or inserting criteria into the Acct field in my listbox to match up with with the Acct from tblSample or frmSample or tblClients or frmBillToShipToNew, it doesnt work, however if i get prompted for input due to bad paramater query syntax and manually add an account number that i am familiar with, the listbox filters perfectly fine.
I just cant get the syntax correct.
If anyone understands my predicament and can offer any input i would be much obliged.
Thanks
BJF
I am having a problem referencing a field in order to filter my listbox.
I'm been driving myself crazy with possible solutions and nothing works yet.
Please assist if you can and i will do my best to be articulate in what i need and currenty have....
TO start,
This is a form with a tab control (which should be irrelevant to my knowledge as far as syntax).
The main form uses recordsource tblClients which has a field Acct.
this Acct field is what i need to reference one way or another at a later point.
tblClients is recordsource for frmBillToShipToNew
On frmBillToShipToNew there is a subform named frmSamples which source is tblSamples also which has a field Acct to join them and id be fine if i could reference this Acct field as well but have not been able to see either.
Where i am not able to see or reference them is in a list box i created on my frmSamples form.
The listbox source is tblSamples as well just like the subform.
The listbox populates with all samples ever created however i want to filter the list to which ever account (Acct) record i am currently on.
no matter what i try whether it be vba code or inserting criteria into the Acct field in my listbox to match up with with the Acct from tblSample or frmSample or tblClients or frmBillToShipToNew, it doesnt work, however if i get prompted for input due to bad paramater query syntax and manually add an account number that i am familiar with, the listbox filters perfectly fine.
I just cant get the syntax correct.
If anyone understands my predicament and can offer any input i would be much obliged.
Thanks
BJF