GreyHounds
Technical User
I have searched the forum for information and I have tried events on multiple forms to the point that I have confused myself inside out. I know it has to be easier than what I have been doing which is sub forms, on load events, on open events, closing the main form and opening a duplicate temp form…I imagine that any one of these things alone might work. My problem is that I am trying too many things. So I need to get back to basic square one – what is the best way to update a field in a table that is opened via a sql qry on the current form.
I have a form where in the properties data tab/record source is a sql statement based on a qry with two tables.
Table 1= tblDefect pk=tblDefect.ROW_ID
Left outer join on
Table2 = tblUpdateClass pk=tblUpdateClass.DEFECT_ROW_ID
Table 1 contains a list of defects with two columns classification and rank which may or may not be populated
Table 2 contains the recommended classification and rank for the defect in Table 1 not every defect in Table 1 has a record in Table 2
The form has the defect number, current classification, current rank, recommended classification (if it exists), recommended rank (if it exists).
Eventually, once all defects in the collection are reviewed the recommended classification and recommended rank willprocessed become the actual classification and rank in Table1
Issues I need to solve:
1. click “the button” and update the correct record in Table 2 to a different rank or classification – however since the table is in use it will not let me update
2. click “the button” and add a new record (if one does not exist) with the Defect Row_ID to Table 2 with a new rank and classification – as above the table is in use so it will not let me update
3. return to the original form with the same record (tblDefect.Row_ID) with the values updated
4. p.s. if i use a sub-form in the main form it is blank if there is no record
What is the correct way to do this, the correct sequence of events, and the correct places to do these things?
I am really poor with Macros but do have a little experience with VB and access.
Thanks in advance for any help you can offer.
Puzzled, perplexed and down-right confused… ?
I have a form where in the properties data tab/record source is a sql statement based on a qry with two tables.
Table 1= tblDefect pk=tblDefect.ROW_ID
Left outer join on
Table2 = tblUpdateClass pk=tblUpdateClass.DEFECT_ROW_ID
Table 1 contains a list of defects with two columns classification and rank which may or may not be populated
Table 2 contains the recommended classification and rank for the defect in Table 1 not every defect in Table 1 has a record in Table 2
The form has the defect number, current classification, current rank, recommended classification (if it exists), recommended rank (if it exists).
Eventually, once all defects in the collection are reviewed the recommended classification and recommended rank willprocessed become the actual classification and rank in Table1
Issues I need to solve:
1. click “the button” and update the correct record in Table 2 to a different rank or classification – however since the table is in use it will not let me update
2. click “the button” and add a new record (if one does not exist) with the Defect Row_ID to Table 2 with a new rank and classification – as above the table is in use so it will not let me update
3. return to the original form with the same record (tblDefect.Row_ID) with the values updated
4. p.s. if i use a sub-form in the main form it is blank if there is no record
What is the correct way to do this, the correct sequence of events, and the correct places to do these things?
I am really poor with Macros but do have a little experience with VB and access.
Thanks in advance for any help you can offer.
Puzzled, perplexed and down-right confused… ?