Access 2003 setting default value on a form

K

Kev

Hi all,

Here’s my problem.
I’ll describe the objects first :

Table : Systems

System_id auto number
Name text
Location text
Comments memo
Level number (10, 20, 30, 40 or 50)

Eventually, users will have a level nr and will be able to
1. maintain entries equal to their own level nr
2. see entries less than or equal to their own level nr


Form : Systems

This is a simple form that has all the fields available for entry.
I’m intending to use this for both 1. and 2. above.


Macros :
For 1. Read_Level_10_Form, Read_Level_20_Form (etc)
For 2. Maintain_Level_10_Form, Maintain_Level_20_Form (etc)

Examples Macros :
Read_Level_20_Form
OpenForm Form Name Systems
View Form
Filter Name <blank>
Where Condition [Systems]![level]<=20
Data Mode Read Only
Window Mode Normal

Maintain_Level_20_Form
OpenForm Form Name Systems
View Form
Filter Name <blank>
Where Condition [Systems]![level]=20 (only maintain own level)
Data Mode Edit
Window Mode Normal


This works fine, until I want to create a new record.
I know how to set the default value of level in the systems form,
but I only know how to set it to a constant. I can set it to 10, or 20 …etc
What I want to do is set it to either 10, 20, 30 etc depending on which
macro called it.
Eg.
Maintain_Level_10_Form would set the default value to 10
Maintain_Level_20_Form would set the default value to 20 …etc

Hope this explains things.
Thanks in advance,
Kev.
 

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