G
Guest
Good afternoon
I'm working on a Maintenance log and have a switchboard/dashboard (more information than commands). One of my tabbed pages is PMs coming up. Well, I have a GO button that calls up the "Assign PM to Technician" form. THAT form isn't running properly when SUBMIT is clicked. Can someone help? I'll explain in comments intertwined. Thank you in advance
Public Sub Submit_Click(
' This section sets up the AREA ID (Building, Plumbing, Storage, Mobile Equipment, Conveyor, etc - based on what the
' Equipment type is
Dim strare
strarea = DLookup("[Area]", "tblEquipment", "TypeDesignator = '" & Left(Forms!frmPMs2WOs.Loc, 1) & "'"
' This section creates the request record in the Request Table and assigns it a value and technician from the form
' Unfortunately, classey(), the function called gives me an error message of 'Undefined function "Classey" in expression'
' The function can be found after the END SUB statement
DoCmd.RunSQL "Insert into tblrequests (classe, WOID, loc, act, division, reqstatus, assignedto, AssTS, PMDate, TimeSt) values (classey(),right(Forms!frmPMs2WOs.PMID,5), Forms!frmPMs2WOs.loc, 'PM', Forms!frmPMs2WOs.divn, 'Assigned', Forms!frmPMs2WOs.Technician,now(),date(),now())
End Su
Public Function classey() as strin
classey = DLast("[AreaDesc]", "tblrequests", "loc = Forms!frmPMs2WOs.loc"
End Functio
Thank you for your help
Derek
I'm working on a Maintenance log and have a switchboard/dashboard (more information than commands). One of my tabbed pages is PMs coming up. Well, I have a GO button that calls up the "Assign PM to Technician" form. THAT form isn't running properly when SUBMIT is clicked. Can someone help? I'll explain in comments intertwined. Thank you in advance
Public Sub Submit_Click(
' This section sets up the AREA ID (Building, Plumbing, Storage, Mobile Equipment, Conveyor, etc - based on what the
' Equipment type is
Dim strare
strarea = DLookup("[Area]", "tblEquipment", "TypeDesignator = '" & Left(Forms!frmPMs2WOs.Loc, 1) & "'"
' This section creates the request record in the Request Table and assigns it a value and technician from the form
' Unfortunately, classey(), the function called gives me an error message of 'Undefined function "Classey" in expression'
' The function can be found after the END SUB statement
DoCmd.RunSQL "Insert into tblrequests (classe, WOID, loc, act, division, reqstatus, assignedto, AssTS, PMDate, TimeSt) values (classey(),right(Forms!frmPMs2WOs.PMID,5), Forms!frmPMs2WOs.loc, 'PM', Forms!frmPMs2WOs.divn, 'Assigned', Forms!frmPMs2WOs.Technician,now(),date(),now())
End Su
Public Function classey() as strin
classey = DLast("[AreaDesc]", "tblrequests", "loc = Forms!frmPMs2WOs.loc"
End Functio
Thank you for your help
Derek