Theguyinthehat
Registered User.
- Local time
- Today, 13:49
- Joined
- Aug 17, 2009
- Messages
- 46
Every time a tool is used, I would like the runcount of that tool to be increased by one. The tools are in a table "Tools", connecting to table "JobEntry" by field ToolID.
My code for the job Entry command button:
Dim runcount
Set runcount = db.OpenRecordset("Tools")
runcount.Edit
runcount("Runcount").Value = runcount("Runcount") + 1
runcount.Update
adds one to the runcount of the tool at the top of the list. I tried:
Set runcount = db.OpenRecorset(SELECT [RunCount] from Tools WHERE ToolID = [JobEntry].ToolID
where [JobEntry].ToolID is supposed to refer to the ToolID in job entry and the first ToolID is supposed to refer to the toolID in the table tools, but it becomes obvious this is completely wrong. I tried using FindRecord after Set runcount = db.OpenRecordset("Tools") but that also didn't work. I wasn't allowed to find/replace now. Can anyone help?
My code for the job Entry command button:
Dim runcount
Set runcount = db.OpenRecordset("Tools")
runcount.Edit
runcount("Runcount").Value = runcount("Runcount") + 1
runcount.Update
adds one to the runcount of the tool at the top of the list. I tried:
Set runcount = db.OpenRecorset(SELECT [RunCount] from Tools WHERE ToolID = [JobEntry].ToolID
where [JobEntry].ToolID is supposed to refer to the ToolID in job entry and the first ToolID is supposed to refer to the toolID in the table tools, but it becomes obvious this is completely wrong. I tried using FindRecord after Set runcount = db.OpenRecordset("Tools") but that also didn't work. I wasn't allowed to find/replace now. Can anyone help?