I converted my well working mdb in a mde and now ran into a problem.
The sign of for the user is over a view froms and can only be done once.
I made this by setting a value in the first form
As follows
Private Sub Form_Load()
'INIT
Dim db As Database
Dim rSt As Recordset
Dim sql As String
Dim janz As Long
'CHECK
sql = "SELECT Lin.master FROM Lin;"
Set db = CurrentDb
Set rSt = db.OpenRecordset(sql)
janz = rSt!master
rSt.Close
db.Close
If janz = 6031961 Then
'ANSWER NOT USED YET
sql = "UPDATE Lin SET Lin.master = 154454874 WHERE (((Lin.master)=6031961));"
DoCmd.SetWarnings False
DoCmd.RunSQL (sql) 'Will block form for further use
DoCmd.SetWarnings True
Else
'ANSWER USED BEFORE
jan = MsgBox(" Update IS EXPIRED CONTACT JanZ. IF YOU DID NOT do the update yet" & Chr(13) & Chr(10) & "You can resend your updates by clicking YES or you can just close the program by clicking NO", vbYesNo, "Expired test")
If jan = 6 Then
'ANSWER SEND AGAIN
DoCmd.Close acForm, "start", acSavePrompt 'For error in mde version
Call SENDit
DoCmd.Quit acQuitSaveNone
Else
'ANSWER DO NOT SEND AGAIN
DoCmd.Quit
End If
End If
End Sub
With the extra line it works fine. However why do I have to close the start form in the MDE and not in the MDB?
I realized after many trials that if the routine comes back from the "SENDit" routine it seems to open the form again or it starts at the top of the Private Sub Form_Load() FUNCTION.
Can anybody explain this to me? or does any body have a better (structured) fix for me?
My fix is trial and error fix. Normally I don't mind if it's fits the column Bill G. errors but I like to know if this is one or if it is a structural problem.
The sign of for the user is over a view froms and can only be done once.
I made this by setting a value in the first form
As follows
Private Sub Form_Load()
'INIT
Dim db As Database
Dim rSt As Recordset
Dim sql As String
Dim janz As Long
'CHECK
sql = "SELECT Lin.master FROM Lin;"
Set db = CurrentDb
Set rSt = db.OpenRecordset(sql)
janz = rSt!master
rSt.Close
db.Close
If janz = 6031961 Then
'ANSWER NOT USED YET
sql = "UPDATE Lin SET Lin.master = 154454874 WHERE (((Lin.master)=6031961));"
DoCmd.SetWarnings False
DoCmd.RunSQL (sql) 'Will block form for further use
DoCmd.SetWarnings True
Else
'ANSWER USED BEFORE
jan = MsgBox(" Update IS EXPIRED CONTACT JanZ. IF YOU DID NOT do the update yet" & Chr(13) & Chr(10) & "You can resend your updates by clicking YES or you can just close the program by clicking NO", vbYesNo, "Expired test")
If jan = 6 Then
'ANSWER SEND AGAIN
Call SENDit
DoCmd.Quit acQuitSaveNone
Else
'ANSWER DO NOT SEND AGAIN
DoCmd.Quit
End If
End If
End Sub
With the extra line it works fine. However why do I have to close the start form in the MDE and not in the MDB?
I realized after many trials that if the routine comes back from the "SENDit" routine it seems to open the form again or it starts at the top of the Private Sub Form_Load() FUNCTION.
Can anybody explain this to me? or does any body have a better (structured) fix for me?
My fix is trial and error fix. Normally I don't mind if it's fits the column Bill G. errors but I like to know if this is one or if it is a structural problem.