greenfalcon
Registered User.
- Local time
- Yesterday, 23:27
- Joined
- Aug 22, 2006
- Messages
- 34
Thanks for looking at my post. What I have done is this, i have built a custom search form for my access database. What i need is a textbox that shows how many records will show up if the user clicks generate form.. I want this textbox to update every time the person changes his search criteria. For example
the person wants to search by address, by typing in
Gold into the address textbox the recordcount textbox would show the user if he were to press generate form he would get
1200 records
now if he changes the address to
GoldStone -- the recordcount textbox would then update to show only
14 records would be shown if he/she generated the form...
Here is my current code
***********
Set db = CurrentDb
Set qdf = db.QueryDefs("MainDB_Search")
For Each prm In qdf.Parameters
prm.Value = Eval(prm.Name)
Next prm
Set rs = qdf.OpenRecordset(dbOpenDynaset)
rsCount = rs.RecordCount
MsgBox (rsCount)
txtGenerateReport.Value = rsCount
************
Now the problem with this code is that it works the first time the user types in search criteria, however when he/she tries to change it from Gold to Goldstone -- nothing happens, it runs the code above and returns 1200 records instead of the correct 14...
Please help
Thanks
Jason
the person wants to search by address, by typing in
Gold into the address textbox the recordcount textbox would show the user if he were to press generate form he would get
1200 records
now if he changes the address to
GoldStone -- the recordcount textbox would then update to show only
14 records would be shown if he/she generated the form...
Here is my current code
***********
Set db = CurrentDb
Set qdf = db.QueryDefs("MainDB_Search")
For Each prm In qdf.Parameters
prm.Value = Eval(prm.Name)
Next prm
Set rs = qdf.OpenRecordset(dbOpenDynaset)
rsCount = rs.RecordCount
MsgBox (rsCount)
txtGenerateReport.Value = rsCount
************
Now the problem with this code is that it works the first time the user types in search criteria, however when he/she tries to change it from Gold to Goldstone -- nothing happens, it runs the code above and returns 1200 records instead of the correct 14...
Please help

Thanks
Jason