By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,665 Members | 1,367 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,665 IT Pros & Developers. It's quick & easy.

Auto Fill Forms

P: n/a
Using an immediate if to fill a field on a form based on the value of
another field. During data entry on the form this methodology works well.
When looking at the results in the datasheet view or the underlying table
this immediate if field contains the default value that was set when
originally setting up the table and the form.

=IIf([Account]=10100100, "CR", "DB") => this works well in the flow of the
form but does not actually populate the table with the correct entry,
actually all entries end up being "DB" even though as I tab through the form
and enter 10100100 the field shows "CR" but when you go back, or run a
query/report, and look in the datasheet view it is "DB", there are no "CR".
I then change them manually in a query or the datasheet view. the default
value was set to "DB" because the majority of entries are "DB".

FYI: Accounts are general ledger account numbers, DB=Debit, CR=Credit; it is
a small program to collect and summarize account information for job costing
and ultimate general ledger posting info.

Thanks Tom
og*****@insightbb.com
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"ogilby1" <og*****@insightbb.com> wrote in message
news:qwOab.389683$cF.118800@rwcrnsc53...
Using an immediate if to fill a field on a form based on the value of
another field. During data entry on the form this methodology works well.
When looking at the results in the datasheet view or the underlying table
this immediate if field contains the default value that was set when
originally setting up the table and the form.

=IIf([Account]=10100100, "CR", "DB") => this works well in the flow of the
form but does not actually populate the table with the correct entry,
actually all entries end up being "DB" even though as I tab through the form
and enter 10100100 the field shows "CR" but when you go back, or run a
query/report, and look in the datasheet view it is "DB", there are no "CR".
I then change them manually in a query or the datasheet view. the default
value was set to "DB" because the majority of entries are "DB".

FYI: Accounts are general ledger account numbers, DB=Debit, CR=Credit; it is
a small program to collect and summarize account information for job costing
and ultimate general ledger posting info.


A control on a form saves data to the table when it has the name of a field as
its ControlSource. Your Control has an expression as its ControlSource.
Therefore nothing is saved to the table.

The good news is that you don't need (nor should you) save a value that can be
derived from other fields. Proper DB design would dictate that you eliminate
the field from the table and just use the expression anyplace you need it.
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.