Default Value To Be Entered On a Form

J

Jeff Garrison

Here's a good one -

I have a database that is split using front end/back end. I have to make
default changes on the year periodically for the users. What I want to do
is to have a table on the back end that I can change the default year so
that all of the forms will display and use the year that is stored in the
Year table. How can I use VBA to display and use whatever in is that table
stored on the back end? I've tried using the Default Value property for the
field (which is unbound), using the syntax [tblDefaultYear]![DefaultYear],
but all I get is the #Name?.

Any help would be greatly appreciated.

Jeff
 
R

Rick Brandt

Jeff Garrison said:
Here's a good one -

I have a database that is split using front end/back end. I have to make
default changes on the year periodically for the users. What I want to do
is to have a table on the back end that I can change the default year so
that all of the forms will display and use the year that is stored in the
Year table. How can I use VBA to display and use whatever in is that table
stored on the back end? I've tried using the Default Value property for the
field (which is unbound), using the syntax [tblDefaultYear]![DefaultYear],
but all I get is the #Name?.


Look in help file for DLookup()
 
F

fredg

Here's a good one -

I have a database that is split using front end/back end. I have to make
default changes on the year periodically for the users. What I want to do
is to have a table on the back end that I can change the default year so
that all of the forms will display and use the year that is stored in the
Year table. How can I use VBA to display and use whatever in is that table
stored on the back end? I've tried using the Default Value property for the
field (which is unbound), using the syntax [tblDefaultYear]![DefaultYear],
but all I get is the #Name?.

Any help would be greatly appreciated.

Jeff

The year table has just one record?
The value is stored as just the year, i.e. 2003, not a full date?
As default value in the control on the form:
=DLookUp("[txtYear]","tblYear")
 
J

Jeff Garrison

That worked! Thanks again for the help.


fredg said:
Here's a good one -

I have a database that is split using front end/back end. I have to make
default changes on the year periodically for the users. What I want to do
is to have a table on the back end that I can change the default year so
that all of the forms will display and use the year that is stored in the
Year table. How can I use VBA to display and use whatever in is that table
stored on the back end? I've tried using the Default Value property for the
field (which is unbound), using the syntax [tblDefaultYear]![DefaultYear],
but all I get is the #Name?.

Any help would be greatly appreciated.

Jeff

The year table has just one record?
The value is stored as just the year, i.e. 2003, not a full date?
As default value in the control on the form:
=DLookUp("[txtYear]","tblYear")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top