set values to blank when I open the form

  • Thread starter Thread starter sg
  • Start date Start date
S

sg

Hi,

I have a form which can lookup by account or name. After user chose the
value from account combo or name combo, the rest infomation (like address
and phone#) will show up. This comes from a query.
But every time I open this inquiry form, address and phone# always show the
first record in the query. I like to show blank till user choose the values.

Please help,
thanks,
Sarah
 
sg said:
I have a form which can lookup by account or name. After user chose the
value from account combo or name combo, the rest infomation (like address
and phone#) will show up. This comes from a query.
But every time I open this inquiry form, address and phone# always show the
first record in the query. I like to show blank till user choose the values.


It sounds like you're using bound controls for search
criteria. That can make a mess of the table's data.

If the form is supposed to display the data you're searching
for, then use separate, unbound controls in the form's
header section for the search criteria.

If the form is not supposed to display any data from a
table/query, then clear the form's RecordSource property as
well as each control's ControlSource property.
 
Hi Marshall,

Actually I'm using unbound controls to do the lookup, and rest of
information like address and etc will show respectively based on the value
chosen.
I'm having problem of address and etc which use bound control, it always
show the first records when I open this search form. Is there a way to show
blank before user chooses the value from unbound control?

Thanks,
Sarah
 
So, it's the bound controls that you want to display
"blank". The unbound criteria controls are already doing
that, right?

If so, then you need to do something to prevent the form's
record source query from finding any records. If you'll
explain how you're appling the criteria values to
filter/search the record source records, I'll see if I can
adapt that to what you want.

Note that a form that has no data to display has other
considerations to keep in mind, so there may be additional
complications to deal with.
 
Back
Top