Link to home
Start Free TrialLog in
Avatar of mdstalla
mdstalla

asked on

MS Access Auto-populate (Default) Table

Experts:

I have a table, ‘Table3’ that has 5 fields:  Condition1, Condition2, Condition3, Condition4 and Condition5.
Each one of these fields are formatted for ‘ShortText’ and can only be populated with 2 possible entries:
“” (Blank) or ‘Delete—‘

I have a separate Form with a button on it that is programed to determine if a particular filed should be “”(Blank) or contain the word ‘Delete—‘ and it will automatically fill the fields on Table3 accordingly.

Note:  This is based on If/Then/ElseIf statements related to entries on other Tables.  For example:

If Field3.Table5 = ‘1’ Then Field1.Table3 = “” (Blank) Else Field1.Table3 = “Delete—“
If Field3.Table5 = ‘2’ Then Field1.Table3 = “Delete--” Else Field1.Table3 = ““ (Blank)

Here’s my problem:  By default, all entries on Table3  are “”(Blank)—that is to say, if none of the conditions are met in one of my If/Then/ElseIF statement—Access will simply leave the field empty in Table3.

I want to reverse this.  What I want is all of the fields in Table3 to say “Delete—“ by default, and only turn to “”(Blank) if a particular condition is met.

Any idea how to do this?

By the way, I’m kind of new to Access so if you could really walk me through each step it would be most appreciated.

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mdstalla
mdstalla

ASKER

Ha!  That was super easy!  I thought this would require 3 pages of code.

Thanks Scott.