Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

counter field and increment feature

Status
Not open for further replies.

cdw0308

Technical User
Oct 8, 2003
181
0
0
US
I have two tables that look like:

Table: projects
fields: project_num text field
project_count text field

Table: po
fields: po_num as text field
po_project_num as text field
po_count as text field

On the form, frm_po with record source to po table I would like to be able to click a button and it retrieve the value of the count field from project table and increment it +1 each time. It needs to be only where project_num is equal to po_project_num.

Then I would like to have the value in the project field update to the latest count. To have a running count by project in the projects table.

Can someone tell me the best way of doing this? Perhaps provide me some code to get on the right path.
As well as what can be put in to keep duplicates from happening.

Thanks
 

Hi cdw0308

I don't really understand your situation. Are your tables related one to another? which fields are the KEY's?

And, maybe what you you really need is to make ) one, or more of - your field(s) an autonumber instead of text?

Ja

 



cdw,

It is best and accepted practice NOT to store aggregations.

Aggregations are best calculated in a query at report time.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top