I have a form i created to work like a calendar and I have listbox so i can drag and drop jobs on the day i want the job to be done and it works well and it changes the date in my database... however I would like my client to be sent a new fax telling him we changed the date of the job... I added a checkbox on my Form and if the checkbox is checked it will change the value fax (a yes/no field) to no so my secretary will resend a fax to everyone with changed date at the end of t he day...
however... the code is crashing my access every single time... if I don't go step by step in the code... it simply close... no message nothing... If I don't go step by step it's simply crash access, no answer from access at all ... he is my code
Code:
Dim DateF As Date
Dim LeSQL As String
Dim db As DAO.Database
Dim rst As DAO.Recordset
DateF = DateDebut + ind2 - 1
Set db = CurrentDb
LeSQL = "Select Date_Shipping, Fax from Tbl_Production where No_Job_Auto=" & NC
Set rst = db.OpenRecordset(LeSQL, dbOpenDynaset)
If Not rst.EOF Then
rst.Edit
rst!Date_Shipping_Debut = DateF
If Btn_Fax= True Then
rst!Fax = -1
End If
rst.Update
End If
rst.Close
Set rst = Nothing
db.Close
Set db = Nothing
what's in bold is my new code... if i remove it, it works flawlessly anyone have an idea ? (p.s sorry for my really bad english it's not my first language)