Solved Help please. Form close writing to dbase

GSE

New member
Local time
Yesterday, 18:04
Joined
Nov 20, 2020
Messages
6
All,
I apologize for my ignorance but I am really struggling with my first database. Keep in mind not good with VB so i have a steep learning curve ahead.

i have a database with a query and a form that i want my users to use to search. Everything works great except when i close the form it writes to my database. Its the only obstacle that i can’t find a solution for so far. Its maddening!!!!! Please help.
 
Hi. Maybe you could try making your form unbound. Or, maybe just the search controls need to be unbound.
 
Hi. Maybe you could try making your form unbound. Or, maybe just the search controls need to be unbound.
I tried that but i think im missing something. How do i point the query to the unbound textbox for the search?
 
I tried that but i think im missing something. How do i point the query to the unbound textbox for the search?
Hi. You should be able to use a form reference, like:

Forms!FormName.ControlName
 
Hi. You should be able to use a form reference, like:

Forms!FormName.ControlName
Instead of controlname i have the name of the textbox. It works when the form and textbox are bound to the query but does not work otherwise.
 
Instead of controlname i have the name of the textbox. It works when the form and textbox are bound to the query but does not work otherwise.
Hi. To make sure we're on the same page, can you post a sample copy of your db with test data?
 
see this demo.
first open Query1 in design view. the query is an example of QBF (query by form).
noticed that the Criteria is using Form1!txtSearch textbox.
so this Query is specially useful when Form1 is open.

on Form1, type any name and press enter.
view the AfterUpdate of the txtSearch.
noticed that again i set the Form's Recordsource.
this will fetch new recordset from the query.
 

Attachments

The problem is you are binding your forms recordsource to the query. I normally use a list box and requery the list box for the search like the alterations to your form attached. Its simple and works to a point or searching on the first name only. Hope it helps
 

Attachments

Users who are viewing this thread

Back
Top Bottom