Hi does anyone have any idea how to have a blank form when a form is selected and opened even though there is data in the tables. At the moment I am unable to achieve this. I want it blank until I search for a specific record.
Just to make sure I am following you. Typically, I open / access a table with code like this.
IF NOT USED('customer')
SELECT 0
USE customer
ELSE
SELECT customer
ENDIF
In your situation, you want to open the table (using the USE statement) and include a parameter telling NODATA.
USE customer NODATA
When you access the form, the text controls will have nothing in them. This prevents an error (if you specified a control source) and brings up the form "empty".
This practice is common when running on a database server (either views or tables) because it prevents the data from being sent down the pipe unless you need to access it. The first record is rarely the one we need at any given time.
Gee, I never realized that. When I tried it worked, or at least I thought it worked because it did not give me an error. However, when I typed browse the data was there.
Well one more "funny" solution. Open the table, go bottom and then SKIP +1. There is a pseudo empty record there beyond the last record at EOF - you can't return values or store anything, but it should allow you to show an empty form!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.