Combo box?

G

Guest

I am designing a form to count a given number of attributes from a data set.
For example, I have a list of features found in a still photo: rock, sand,
mud. Each feature is its own field of a table. In my form, I would like to
make a combo box so that I can click those little up and down arrows to count
the number of rocks, sandy patches, etc ina given photo, as I am counting
them. I need the option of having a maximum of 50 counts per field, per
photo. (Each photo is its own record, the "PhotoID" is the primary key.)
I'm not sure if this matters, but I currently have a "photo" table including
photo number, date taken, etc. I also have a "geo" table with different
geological features as well as other tables with animals that may be present
in the photo, another table with plants, etc. All options from all tables
appear in the form, and all are related by the primary key, "photoID".
I hope this makes sense! Thank you so much!
Ashley
 
G

Guest

Ashley:
It sounds like you are asking how to make a button that you can click to
count items in your photos. If that is the case, put code on the click event
of a button:

Me.[Name Of Your Field].value = Nz(Me.[Name Of Your Field].value, 0) + 1

The "Nz" will take care of situations where the value of the field is null.
You can use a combobox to programmatically change what field you are storing
the value in, such as a different field for rocks, mud, etc.
 
G

Guest

Thanks, that makes sense. But I tried it:
Me.[numM].value = Nz(Me.[numM].value, 0) + 1
and it says it couldn't find the Macro.
I put the above expression for "on click" under the "event" tab of the
properties of my button. Is that the right place?
Will substituting "- 1" at the end make a downward counting button?
Thank you SO much!!


smk23 said:
Ashley:
It sounds like you are asking how to make a button that you can click to
count items in your photos. If that is the case, put code on the click event
of a button:

Me.[Name Of Your Field].value = Nz(Me.[Name Of Your Field].value, 0) + 1

The "Nz" will take care of situations where the value of the field is null.
You can use a combobox to programmatically change what field you are storing
the value in, such as a different field for rocks, mud, etc.

--
sam


Ashley said:
I am designing a form to count a given number of attributes from a data set.
For example, I have a list of features found in a still photo: rock, sand,
mud. Each feature is its own field of a table. In my form, I would like to
make a combo box so that I can click those little up and down arrows to count
the number of rocks, sandy patches, etc ina given photo, as I am counting
them. I need the option of having a maximum of 50 counts per field, per
photo. (Each photo is its own record, the "PhotoID" is the primary key.)
I'm not sure if this matters, but I currently have a "photo" table including
photo number, date taken, etc. I also have a "geo" table with different
geological features as well as other tables with animals that may be present
in the photo, another table with plants, etc. All options from all tables
appear in the form, and all are related by the primary key, "photoID".
I hope this makes sense! Thank you so much!
Ashley
 

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