A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Question about a default table or method



 
 
Thread Tools Display Modes
  #1  
Old November 14th, 2005, 12:16 AM
Joe Cilinceon
external usenet poster
 
Posts: n/a
Default Question about a default table or method

What is the best way to have defaults in one location but available to the
whole application. Some examples would be Sales Tax rate, Late Fee charge in
addition to things like scanners/printers or other things used with in the
program.

--

Joe Cilinceon



  #2  
Old November 14th, 2005, 01:32 AM
Tom
external usenet poster
 
Posts: n/a
Default Question about a default table or method

You can set a default value for a field in the bottom part of the table
design view and this default value carries throughout the database
everywhere the field is used. You can also set the default value for a field
on a form and this default value will only be applied on that form. If you
set the default value in a table and want to use a different default value
on a particular form, set the default value also on the form and it will
override the table default value. The table default value will be applied on
all other forms.


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications

www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!

"Joe Cilinceon" wrote in message
...
What is the best way to have defaults in one location but available to the
whole application. Some examples would be Sales Tax rate, Late Fee charge
in addition to things like scanners/printers or other things used with in
the program.

--

Joe Cilinceon





  #3  
Old November 14th, 2005, 02:43 AM
Joe Cilinceon
external usenet poster
 
Posts: n/a
Default Question about a default table or method

Tom wrote:
You can set a default value for a field in the bottom part of the
table design view and this default value carries throughout the
database everywhere the field is used. You can also set the default
value for a field on a form and this default value will only be
applied on that form. If you set the default value in a table and
want to use a different default value on a particular form, set the
default value also on the form and it will override the table default
value. The table default value will be applied on all other forms.


Thanks for responding Tom but I not quite what I was asking.

I'm looking for a method that will set a var thru a whole program. Now these
var are only used when calculating totals. A couple of examples would be
sales tax that is now 6% but tomorrow could change to 6.5% or a set fee
charge. At the moment I would have to go thru about 20 queries to find and
change these types of things. I would much prefer to either change it in a
table and load on startup or perhaps a module. I'm really not sure the best
way and that is what I'm asking here. Thanks again

--

Joe Cilinceon



  #4  
Old November 14th, 2005, 03:17 AM
PC Datasheet
external usenet poster
 
Posts: n/a
Default Question about a default table or method

Joe,

Look at TableDefs and Fields collection in the Help file. You need code that
gets to something like this:
Db.TableDefs("MyTable")!Fields("SalesTax").Default Value = .065

This might not be totally the correct syntax but it gives you the idea of
what to look for in the Help file.


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications

www.pcdatasheet.com

If you can't get the help you need in the newsgroup, I can help you for a
very reasonable fee. Over 1000 Access users have come to me for help.
Need a month calendar or 7 day calendar? Need appointment scheduling? Need
room reservations scheduling? Need employee work scheduling? Contact me!



"Joe Cilinceon" wrote in message
...
Tom wrote:
You can set a default value for a field in the bottom part of the
table design view and this default value carries throughout the
database everywhere the field is used. You can also set the default
value for a field on a form and this default value will only be
applied on that form. If you set the default value in a table and
want to use a different default value on a particular form, set the
default value also on the form and it will override the table default
value. The table default value will be applied on all other forms.


Thanks for responding Tom but I not quite what I was asking.

I'm looking for a method that will set a var thru a whole program. Now
these var are only used when calculating totals. A couple of examples
would be sales tax that is now 6% but tomorrow could change to 6.5% or a
set fee charge. At the moment I would have to go thru about 20 queries to
find and change these types of things. I would much prefer to either
change it in a table and load on startup or perhaps a module. I'm really
not sure the best way and that is what I'm asking here. Thanks again

--

Joe Cilinceon





  #5  
Old November 14th, 2005, 04:27 AM
Joe Cilinceon
external usenet poster
 
Posts: n/a
Default Question about a default table or method

Thanks again I will check it out.

PC Datasheet wrote:
Joe,

Look at TableDefs and Fields collection in the Help file. You need
code that gets to something like this:
Db.TableDefs("MyTable")!Fields("SalesTax").Default Value = .065

This might not be totally the correct syntax but it gives you the
idea of what to look for in the Help file.



"Joe Cilinceon" wrote in message
...
Tom wrote:
You can set a default value for a field in the bottom part of the
table design view and this default value carries throughout the
database everywhere the field is used. You can also set the default
value for a field on a form and this default value will only be
applied on that form. If you set the default value in a table and
want to use a different default value on a particular form, set the
default value also on the form and it will override the table
default value. The table default value will be applied on all other
forms.


Thanks for responding Tom but I not quite what I was asking.

I'm looking for a method that will set a var thru a whole program.
Now these var are only used when calculating totals. A couple of
examples would be sales tax that is now 6% but tomorrow could change
to 6.5% or a set fee charge. At the moment I would have to go thru
about 20 queries to find and change these types of things. I would
much prefer to either change it in a table and load on startup or
perhaps a module. I'm really not sure the best way and that is what
I'm asking here. Thanks again --

Joe Cilinceon


--

Joe Cilinceon



  #6  
Old November 14th, 2005, 04:29 AM
Duane Hookom
external usenet poster
 
Posts: n/a
Default Question about a default table or method

This is data. Data is stored in tables. Use functions and/or code to define
default values in text boxes on forms.

--
Duane Hookom
MS Access MVP
--

"Joe Cilinceon" wrote in message
...
Thanks again I will check it out.

PC Datasheet wrote:
Joe,

Look at TableDefs and Fields collection in the Help file. You need
code that gets to something like this:
Db.TableDefs("MyTable")!Fields("SalesTax").Default Value = .065

This might not be totally the correct syntax but it gives you the
idea of what to look for in the Help file.



"Joe Cilinceon" wrote in message
...
Tom wrote:
You can set a default value for a field in the bottom part of the
table design view and this default value carries throughout the
database everywhere the field is used. You can also set the default
value for a field on a form and this default value will only be
applied on that form. If you set the default value in a table and
want to use a different default value on a particular form, set the
default value also on the form and it will override the table
default value. The table default value will be applied on all other
forms.

Thanks for responding Tom but I not quite what I was asking.

I'm looking for a method that will set a var thru a whole program.
Now these var are only used when calculating totals. A couple of
examples would be sales tax that is now 6% but tomorrow could change
to 6.5% or a set fee charge. At the moment I would have to go thru
about 20 queries to find and change these types of things. I would
much prefer to either change it in a table and load on startup or
perhaps a module. I'm really not sure the best way and that is what
I'm asking here. Thanks again --

Joe Cilinceon


--

Joe Cilinceon





  #7  
Old November 14th, 2005, 04:42 AM
John Marshall, MVP
external usenet poster
 
Posts: n/a
Default Question about a default table or method

Take a look at "Understanding the Lifetime of Variables" in the VBA help to
get an understanding of how to set up a variable that will last for a
session.

As Duane mentioned, data should be kept in tables. Try and limit the use of
global variables to the smallest scope possible and load them from a table.
Remember, the data in the table could change and what is in the variable
will be obsolete.

John... Visio MVP

"Joe Cilinceon" wrote in message
...
What is the best way to have defaults in one location but available to the
whole application. Some examples would be Sales Tax rate, Late Fee charge
in addition to things like scanners/printers or other things used with in
the program.

--

Joe Cilinceon





  #8  
Old November 14th, 2005, 05:25 AM
PC Datasheet
external usenet poster
 
Posts: n/a
Default Question about a default table or method

Go back to Visio, you don't know what you are talking about (just like all
the posts you have made!!) Joe asked about default values not global
variables.


"John Marshall, MVP" wrote in message
...
Take a look at "Understanding the Lifetime of Variables" in the VBA help
to get an understanding of how to set up a variable that will last for a
session.

As Duane mentioned, data should be kept in tables. Try and limit the use
of global variables to the smallest scope possible and load them from a
table. Remember, the data in the table could change and what is in the
variable will be obsolete.

John... Visio MVP

"Joe Cilinceon" wrote in message
...
What is the best way to have defaults in one location but available to
the whole application. Some examples would be Sales Tax rate, Late Fee
charge in addition to things like scanners/printers or other things used
with in the program.

--

Joe Cilinceon







  #9  
Old November 14th, 2005, 05:31 AM
Joe Cilinceon
external usenet poster
 
Posts: n/a
Default Question about a default table or method

Thanks that I kind of knew.

Duane Hookom wrote:
This is data. Data is stored in tables. Use functions and/or code to
define default values in text boxes on forms.

--
Duane Hookom
MS Access MVP

"Joe Cilinceon" wrote in message
...
Thanks again I will check it out.

PC Datasheet wrote:
Joe,

Look at TableDefs and Fields collection in the Help file. You need
code that gets to something like this:
Db.TableDefs("MyTable")!Fields("SalesTax").Default Value = .065

This might not be totally the correct syntax but it gives you the
idea of what to look for in the Help file.



"Joe Cilinceon" wrote in message
...
Tom wrote:
You can set a default value for a field in the bottom part of the
table design view and this default value carries throughout the
database everywhere the field is used. You can also set the
default value for a field on a form and this default value will
only be applied on that form. If you set the default value in a
table and want to use a different default value on a particular
form, set the default value also on the form and it will override
the table default value. The table default value will be applied
on all other forms.

Thanks for responding Tom but I not quite what I was asking.

I'm looking for a method that will set a var thru a whole program.
Now these var are only used when calculating totals. A couple of
examples would be sales tax that is now 6% but tomorrow could
change to 6.5% or a set fee charge. At the moment I would have to
go thru about 20 queries to find and change these types of things.
I would much prefer to either change it in a table and load on
startup or perhaps a module. I'm really not sure the best way and
that is what I'm asking here. Thanks again --

Joe Cilinceon


--

Joe Cilinceon


--

Joe Cilinceon



  #10  
Old November 14th, 2005, 05:31 AM
Joe Cilinceon
external usenet poster
 
Posts: n/a
Default Question about a default table or method

Thanks John

John Marshall, MVP wrote:
Take a look at "Understanding the Lifetime of Variables" in the VBA
help to get an understanding of how to set up a variable that will
last for a session.

As Duane mentioned, data should be kept in tables. Try and limit the
use of global variables to the smallest scope possible and load them
from a table. Remember, the data in the table could change and what
is in the variable will be obsolete.

John... Visio MVP

"Joe Cilinceon" wrote in message
...
What is the best way to have defaults in one location but available
to the whole application. Some examples would be Sales Tax rate,
Late Fee charge in addition to things like scanners/printers or
other things used with in the program.

--

Joe Cilinceon


--

Joe Cilinceon



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Add New Field to DB Karen Database Design 7 October 19th, 2005 08:03 PM
Survey Results SAm Running & Setting Up Queries 10 May 17th, 2005 08:32 PM
Access combo box-show name, not ID, in table? write on New Users 30 April 30th, 2005 09:11 PM
Table Design A. Williams Database Design 3 April 29th, 2005 07:02 PM
unable to repair inobox Sudheer Mumbai General Discussion 1 February 20th, 2005 12:55 PM


All times are GMT +1. The time now is 11:37 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.