I am writing a code that takes checks if the value of the action box is Serviced and then outputs, you have chosen Serviced and then adds the data of the form to the Service_Tracker table.
It was working fine sometime ago but now it doesn't. There are no errors, no mistakes, nothing.
Microsoft access just completely ignores the "if" statement completely. Please I really need help. And I have already set the db= CurrentDb Here is the code
If Me.Action_Box.Value = "Serviced" Then
MsgBox ("YOU CHOSE SERVICED")
Dim service_track As Recordset
Set service_track = db.OpenRecordset("Service_Tracker")
service_track.AddNew
service_track![company_name] = Me.Comp_Box.Value
service_track![site_name] = Me.site_box.Value
service_track![Serviced_Date] = Me.sched_date_box.Value
service_track![Status_Date] = Me.stat_date_box.Value
service_track.Update
MsgBox ("It hass been added to the database")
End If


Aucun commentaire:
Enregistrer un commentaire