Hello All,
I have a query suppling a subform in a tabbed form.
In the form I have a textbox that acts as the criteria for the query (LIKE "*" & ...... & "*" ) when the form it opened it returns all the records until a surname if typed into the textbox, so it works fine.
Problem is that I want the form to open to show a blank record (or ideally nothing) but not as a data entry form as then the search doesn't work. I have tried to put autonumberID 1 as a blank record but then it just doesn't show in the query.
Any ideas?
Thanks
It sounds to me like you have AllowNewRecords set to false. If you have DataEntry set to True, it will not show records.
Also, while I hate tab controls, preferring navigation controls, If I have a filtering mechanism on a subform, it needs to located in the header or footer section.
Try working with the Filter instead of query. However, I prefer to uses TempVars in Queries in the manner you are using it.
If you work with filers, the filteron property needs to be set to true. Data entry needs to be False.
As for your specific need, using TempVars, I will set the value to anything else that I know will not be in the search column. I will generally use -1 or 0 for number columns or zzzzzzzzzzz for text columns