I have used VBA quite a lot before for Microsoft Excel, but only once before (terribly) for Access. Please bare with me as I try to explain what I intend to do with this code!!
I'm looking to have the code run and do the following:
1) Run my Update and Append Queries
2) Start running the searches and lookups and putting out the answers I need.
3) Run the Select and Delete Queries to get rid of the unnecessary information.
I'm having a problem with #2 (as #1 and #3 are just DoCmd.OpenQuery and I should have no problem with those, though it may be extra queries but I'll learn to make it more efficient after I get it to run haha)
I want to update my main table [U-Pull] and its "B-Comments", "M-Date", and "M-Time" fields.
The way it will update this comments field is based on the following logic:
a) If "Party" in [U-Pull] is "PartyA" and "ID#" for that recordset IS found in [M-Pull].[ID#] (Second table and field), then change "B-Comments" to "Finished", change "M-Date" and "M-time" to the corresponding "M-Date" and "M-Time" in [M-Pull] under the same ID# (Like a DLOOKUP).
b) If "Party" in [U-Pull] is "PartyA" and "ID#" for each recordset IS NOT found in [M-Pull].[ID#], then change "B-Comments" to "Not found - Please try again tomorrow." and leave "M-Date" and "M-time" blank in [U-Pull].
c) I'm still figuring out the logic for the case where "Party" in [U-Pull] is NOT "PartyA" so I'm going to leave that unfinished for the time being as I try to follow the logic I've been using in my excel document.
I hope somebody can help me with the logic for a) and b) and I can hopefully have more on the rest of the logic by the time I get a response.
Thanks in advance and if you have any questions and/or need clarification, please let me know. I know it's a lot but I really do appreciate any help that can be provided!!!!
Thanks,
M
I'm looking to have the code run and do the following:
1) Run my Update and Append Queries
2) Start running the searches and lookups and putting out the answers I need.
3) Run the Select and Delete Queries to get rid of the unnecessary information.
I'm having a problem with #2 (as #1 and #3 are just DoCmd.OpenQuery and I should have no problem with those, though it may be extra queries but I'll learn to make it more efficient after I get it to run haha)
I want to update my main table [U-Pull] and its "B-Comments", "M-Date", and "M-Time" fields.
The way it will update this comments field is based on the following logic:
a) If "Party" in [U-Pull] is "PartyA" and "ID#" for that recordset IS found in [M-Pull].[ID#] (Second table and field), then change "B-Comments" to "Finished", change "M-Date" and "M-time" to the corresponding "M-Date" and "M-Time" in [M-Pull] under the same ID# (Like a DLOOKUP).
b) If "Party" in [U-Pull] is "PartyA" and "ID#" for each recordset IS NOT found in [M-Pull].[ID#], then change "B-Comments" to "Not found - Please try again tomorrow." and leave "M-Date" and "M-time" blank in [U-Pull].
c) I'm still figuring out the logic for the case where "Party" in [U-Pull] is NOT "PartyA" so I'm going to leave that unfinished for the time being as I try to follow the logic I've been using in my excel document.
I hope somebody can help me with the logic for a) and b) and I can hopefully have more on the rest of the logic by the time I get a response.
Thanks in advance and if you have any questions and/or need clarification, please let me know. I know it's a lot but I really do appreciate any help that can be provided!!!!
Thanks,
M