Samantha
still learning...
- Local time
- Today, 17:43
- Joined
- Jul 12, 2012
- Messages
- 180
Hello!
I am stumped here. I am trying to incorporate the following code attached to a button merging information into Excel. JobStatus is a field on my form that would have a value between 1-4 if the PK is on the table at all. The form is based on a query tying my main table tblProposals with tblWOH. When a job is approved the JobNumber (PK) is added to tblWOH with the JobStatus field defaulted to 1. I realize thats why I am not getting the proper results returned - the PK is not in the table at this point however idk how to fix it. Maybe my whole approach is wrong - any advice would be greatly appreciated!
I am stumped here. I am trying to incorporate the following code attached to a button merging information into Excel. JobStatus is a field on my form that would have a value between 1-4 if the PK is on the table at all. The form is based on a query tying my main table tblProposals with tblWOH. When a job is approved the JobNumber (PK) is added to tblWOH with the JobStatus field defaulted to 1. I realize thats why I am not getting the proper results returned - the PK is not in the table at this point however idk how to fix it. Maybe my whole approach is wrong - any advice would be greatly appreciated!
Code:
If Result = IsEmpty(JobStatus) Then
MsgBox "This job needs to be added to WOH prior to generating a project sheet.", vbOKOnly, "Error"
GoTo Exit_Procedure
Else