evaluate field

A

alex

Using Access ’03…

I have a form (actually used as a subform) with approx. 15 columns.

I attempting to write code that would evaluate 15 fields (in 3 sets)
and ask the question: iff is null then “*”.

For example, if a user types data in one field, I would like Access to
insert “*” in the four other fields (if they are null or contain “”).
If the user types data into two of the fields, then “*” would be
inserted into three fields.

I’m not sure if I need to define three separate arrays, then ask: if
any (contained in the array) is null or “”, then value = “*”.

Any thoughts?
alex
 
C

Clif McIrvin

Alex -- I wish I had a better answer for you. I've seen examples of
routines that would do what I think you need; unfortunately I don't have
links to the discussion(s), nor which MVP pages apply close at hand.

Something on the order of:

dim ctl as control
for each ctl in me.controls
if ctl.ControlType = acTextBox then
[your code here]
end if
next ctl

Assuming that the controls in question are all text boxes.

If you don't get a better reply within a reasonable time, you might try
re-posting with a more descriptive subject line.

There are ways to accomplish what it sounds like you are asking.

Here are some tutorials and other resources that you should find
helpful:

A free tutorial written by Crystal (MS Access MVP):
http://www.accessmvp.com/Strive4Peace/Index.htm
also at http://allenbrowne.com/casu-22.html

MVP Allen Browne's tutorials:
http://allenbrowne.com/links.html#Tutorials

Here's a primer with 23 well defined, well written, clearly named
chapters:
http://www.functionx.com/vbaccess/index.htm

The Access Web resources page:
http://www.mvps.org/access/resources/index.html

Jeff Conrad's resources page:
http://www.accessmvp.com/JConrad/accessjunkie/resources.html
--
Clif
Still learning Access 2003

Using Access ’03…

I have a form (actually used as a subform) with approx. 15 columns.

I attempting to write code that would evaluate 15 fields (in 3 sets)
and ask the question: iff is null then “*”.

For example, if a user types data in one field, I would like Access to
insert “*” in the four other fields (if they are null or contain “”).
If the user types data into two of the fields, then “*” would be
inserted into three fields.

I’m not sure if I need to define three separate arrays, then ask: if
any (contained in the array) is null or “”, then value = “*”.

Any thoughts?
alex
 
A

alex

Alex -- I wish I had a better answer for you.  I've seen examples of
routines that would do what I think you need; unfortunately I don't have
links to the  discussion(s), nor which MVP pages apply close at hand.

Something on the order of:

dim ctl as control
for each ctl in me.controls
  if ctl.ControlType = acTextBox then
    [your code here]
  end if
next ctl

Assuming that the controls in question are all text boxes.

If you don't get a better reply within a reasonable time, you might try
re-posting with a more descriptive subject line.

There are ways to accomplish what it sounds like you are asking.

Here are some tutorials and other resources that you should find
helpful:

A free tutorial written by Crystal (MS Access MVP):http://www.accessmvp.com/Strive4Peace/Index.htm
also athttp://allenbrowne.com/casu-22.html

MVP Allen Browne's tutorials:http://allenbrowne.com/links.html#Tutorials

Here's a primer with 23 well defined, well written, clearly named
chapters:http://www.functionx.com/vbaccess/index.htm

The Access Web resources page:http://www.mvps.org/access/resources/index.html

Jeff Conrad's resources page:http://www.accessmvp.com/JConrad/accessjunkie/resources.html
--
Clif
Still learning Access 2003


Using Access ’03…

I have a form (actually used as a subform) with approx. 15 columns.

I attempting to write code that would evaluate 15 fields (in 3 sets)
and ask the question:  iff is null then “*”.

For example, if a user types data in one field, I would like Access to
insert “*” in the four other fields (if they are null or contain “”).
If the user types data into two of the fields, then “*” would be
inserted into three fields.

I’m not sure if I need to define three separate arrays, then ask:  if
any (contained in the array) is null or “”, then value = “*”.

Any thoughts?
alex

Thanks Clif...I'll give this a look. Any help is appreciated!
 

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