From: Pierkes on
Hi,

I have a form on which i present al lot of data from a database.
On the form is a comobox which i use to select the right record en present
the data of this record on the form.

When i open de form, de combobox is empty (which is good !) but the rest of
the form is already filled with the data of a record in the database (which
is not good). When i choose a record for the combobox, the form is filled
with the data of that particular record (which is good).

So the only problem i have is on opening the form. Is it possible to open
the form without it being filled with data of a certain record (so is see a
blank form) ?

Help will be much appreciated!
Pierre


From: Jörn Bosse on
Am 30.05.2010 19:50, schrieb Pierkes:
> Hi,
>
> I have a form on which i present al lot of data from a database.
> On the form is a comobox which i use to select the right record en present
> the data of this record on the form.
>
> When i open de form, de combobox is empty (which is good !) but the rest of
> the form is already filled with the data of a record in the database (which
> is not good). When i choose a record for the combobox, the form is filled
> with the data of that particular record (which is good).
>
> So the only problem i have is on opening the form. Is it possible to open
> the form without it being filled with data of a certain record (so is see a
> blank form) ?
>
> Help will be much appreciated!
> Pierre
>
>
Hi,

you can try something like this. Create a record without any
information. That means with no entries, except of one column. For
example a 0 in a field with integer-values. When you open the Form, you
will only see that 0 and nothing else. That is the most easy way to
solve this problem, i guess.

Greetings, J�rn
From: Tom Wickerath AOS168b AT comcast DOT on
Hi Pierre,

> So the only problem i have is on opening the form. Is it possible to open
> the form without it being filled with data of a certain record (so is see a
> blank form) ?

Yes. Simply add a WHERE 1=0 clause to the form's recordsource (saved query
or SQL statement). You will need to reassign the form's recordsource in the
AfterUpdate procedure for your combo box. I have an example that uses a main
search form with a subform, but is is a bit more complex that simply using a
combo box. But, it does reassign the recordsource for the subform with each
query run. You might want to have a look, here:

http://www.accessmvp.com/TWickerath/downloads/elements.zip

http://www.accessmvp.com/TWickerath/downloads/Chap08QBF.zip

http://www.seattleaccess.org/downloads.htm
See the download "Query By Form"
Tom Wickerath, February 12, 2008



Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
__________________________________________

"Pierkes" wrote:

> Hi,
>
> I have a form on which i present al lot of data from a database.
> On the form is a comobox which i use to select the right record en present
> the data of this record on the form.
>
> When i open de form, de combobox is empty (which is good !) but the rest of
> the form is already filled with the data of a record in the database (which
> is not good). When i choose a record for the combobox, the form is filled
> with the data of that particular record (which is good).
>
> So the only problem i have is on opening the form. Is it possible to open
> the form without it being filled with data of a certain record (so is see a
> blank form) ?
>
> Help will be much appreciated!
> Pierre
From: Steve on
Hi Pierre,

Add code to the open event of the form that opens the form to a new record.
Your form will then be blank. Then when you choose a record ftom the
combobox, the form will display that record.

Steve
santus(a)penn.com



"Pierkes" <info(a)advisearch.nl> wrote in message
news:4c02a554$0$15511$703f8584(a)news.kpn.nl...
> Hi,
>
> I have a form on which i present al lot of data from a database.
> On the form is a comobox which i use to select the right record en present
> the data of this record on the form.
>
> When i open de form, de combobox is empty (which is good !) but the rest
> of the form is already filled with the data of a record in the database
> (which is not good). When i choose a record for the combobox, the form is
> filled with the data of that particular record (which is good).
>
> So the only problem i have is on opening the form. Is it possible to open
> the form without it being filled with data of a certain record (so is see
> a blank form) ?
>
> Help will be much appreciated!
> Pierre
>


From: Tom Wickerath AOS168b AT comcast DOT on
No, Steve, the form will not display the record of interest. The reason is
that the recordset contains no existing records. Try it out if you don't
believe me.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
__________________________________________

"Steve" wrote:

> Hi Pierre,
>
> Add code to the open event of the form that opens the form to a new record.
> Your form will then be blank. Then when you choose a record ftom the
> combobox, the form will display that record.
>
> Steve
> santus(a)penn.com
 |  Next  |  Last
Pages: 1 2 3
Prev: test II
Next: Resource For Help With Access