Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form to load showing all fields blank

Status
Not open for further replies.

Russie

Programmer
Dec 24, 2000
104
US
Hi.

This is probably a simple question but...

When you have a form with a combo box on it that selects records how do you make all of the fields on the form display no data until a record is selected?

Thanks.

Russie
 
How are ya Russie . . . . .

You can set the [blue]RecordSource[/blue] for the form to nothing. Then on selection fron the [blue]Combobox[/blue] [purple]set the Recordsource proper.[/purple]

Calvin.gif
See Ya! . . . . . .
 
Thanks Ace.

When I clear the record source for the form and load it I get a #Name? error on all fields. Obviously because the control source for all fields are set it is trying to resolve the table name.

What did I do wrong?

Thanks.
 
Russie . . . . .

Yes . . . . your right, thats exactly what should happen! I was thinking of something else.

I have two alternate methods (that work) but can't post until later on today . . . . Just hang in there . . .

Calvin.gif
See Ya! . . . . . .
 
OK Russie . . . . .

In form design view, set the [blue]Data Entry[/blue] property of the form to [purple]True[/purple]. This causes the form to open with a single blank record for data entry.

Then, in your code for the combobox, at the beginning of the code, set the property back to false:
Code:
[blue]   Me.DataEntry = False
             [green]'
         Your Code
             '[/green][/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top