update field

jd_boss_hogg

Registered User.
Local time
Today, 20:24
Joined
Aug 5, 2009
Messages
88
Hi All - hoping somebody can help... i know very little about access, its only one of the many hats i have to wear. I need to perform a function and don't know where to start really. Id prefer it to be in a query or macro rather then VBA (because i understand it better).

I have a form, which displays a load of fields. Some of them are active, most of them are look-ups. When one of the values of the active fields is changed, i want to run a macro that changes the value of a lookup field.

So, when [schedule] on this form is changed, search for the record where [job#] [this form] = [job#][fulltable] and then run a macro that updates a field called "due-date" in that record.

I think I'm all lacking is how to put a "where" clause (where customer this form = customer in table) in the macro ?

Sorry, i don't know how to put it better than that, i don't have the word skills to describe stuff in Access.
 
Difficult to be definitive / prescriptive as the question lacks specifics. Firstly - you have a form where you can change the value of the Scheduled control - does your form display the Job record (job#)? If so is there a due date displayed for the job? Otherwise how does Schedule relate to Job?
You then mention the customer form - what do you need to do there?

If you can improve the explanation of what you are trying to do in business terms and provide a copy of your database, with sample data it would be easier to assist.
 
So i have one master form (frmMainEntryForm) , that holds 2 sub forms (one being frmJobCardDataEntry) . These forms get their data from the same table.

so, when [frmMainEntryForm] /or/ [frmJobCardDataEntry] field called [CheckPlotApproveAt] is changed, run a macro that will set a value in
=DLookUp("Due","jb-2001","[Job No]=" & [Forms]![frmMainEntryForm]![Job No])

this is my macro code..... my problem , i think, is that "DUE" is just a lookup field, its not "in" the form itself.
1707224366536.png


Sorry if that is probably a crap explanation, i dont have the access vocabulary to explain it any other way
 

Attachments

  • 1707224471247.png
    1707224471247.png
    18.1 KB · Views: 150
So i have one master form (frmMainEntryForm) , that holds 2 sub forms (one being frmJobCardDataEntry) . These forms get their data from the same table.

so, when [frmMainEntryForm] /or/ [frmJobCardDataEntry] field called [CheckPlotApproveAt] is changed, run a macro that will set a value in
=DLookUp("Due","jb-2001","[Job No]=" & [Forms]![frmMainEntryForm]![Job No])

this is my macro code..... my problem , i think, is that "DUE" is just a lookup field, its not "in" the form itself.
View attachment 112422

Sorry if that is probably a crap explanation, i dont have the access vocabulary to explain it any other way
Can you upload the database?
 

Users who are viewing this thread

Back
Top Bottom