G
Gary Tucker via AccessMonster.com
Hello all,
I have designed a phone log database with a simple front end for callers to
pull up a screen that displays a persons name, address, and other personal
information along with options to select, depending on whether or not the
customer answered or not. To enable multiple users on this database, I simply
update an "Onscreen" check box each time a record is pulled up so another
user cannot not pull up the same name (The code will be pasted below for help
).
After trying a few different things, the best fail proof way that I could
come up with to go to the next record was to close the form an re-open it. It
works fine but I really don't like the affect of seeing the form dissapear
and then reappear. Is there a way to go to the next record withhout closing
the form and yet requery (I've tried using requery function but it wasn't
recognizing the OnScreen update as I hoped) everything so it recognizes the
OnScreen flag as well as a DateLastCalled flag that I use to ensure that the
same person does not get called on the same day? Or, since it is very stable
when closing and re-opening the form, is there a way to do a freeze frame on
the actual form while it closed and re-opened so the user does not see the
form flicker on and off? Below is the code I used. Feel free to offer any
critique or advice, Thanks!
Private Sub funcNextCall_Click()
On Error GoTo Err_funcNextCall_Click
If Me.Frm_Call_Log_subform![Yes/No?] = "" Then
If MsgBox("Do you want to skip this person?", vbYesNo, "Deep Care") =
vbYes Then ' allows user to skip the person on the screen they want
Me.OnScreen = False
DoCmd.Close acForm, "Frm Caller Log"
DoCmd.OpenForm "Frm Caller Log", acNormal, , , acFormEdit,
acWindowNormal
End If
ElseIf Me.Frm_Call_Log_subform![Verify] = 0 Then
MsgBox "You must check one selection before proceeding!", , "Deep
Care" ' checks for one option selected
ElseIf Me.Frm_Call_Log_subform![Verify] > 1 Then
MsgBox "You can only check one call response before proceeding"
'Only one option can be selected
ElseIf Me.Frm_Call_Log_subform![Verify] = 1 Then ' Assures that only
one option was selected
Me.Date_Last_Called = Date ' Updates Date last called to todays
date - Keeps same person from getting called on the same day.
Me.History = 1 ' Flags call history notifier
Me.OnScreen = False
DoCmd.Close
DoCmd.OpenForm "Frm Caller Log"
End If
Thanks for any help!
Exit_funcNextCall_Click:
Exit Sub
Err_funcNextCall_Click:
MsgBox Err.Description
Resume Exit_funcNextCall_Click
I have designed a phone log database with a simple front end for callers to
pull up a screen that displays a persons name, address, and other personal
information along with options to select, depending on whether or not the
customer answered or not. To enable multiple users on this database, I simply
update an "Onscreen" check box each time a record is pulled up so another
user cannot not pull up the same name (The code will be pasted below for help
).
After trying a few different things, the best fail proof way that I could
come up with to go to the next record was to close the form an re-open it. It
works fine but I really don't like the affect of seeing the form dissapear
and then reappear. Is there a way to go to the next record withhout closing
the form and yet requery (I've tried using requery function but it wasn't
recognizing the OnScreen update as I hoped) everything so it recognizes the
OnScreen flag as well as a DateLastCalled flag that I use to ensure that the
same person does not get called on the same day? Or, since it is very stable
when closing and re-opening the form, is there a way to do a freeze frame on
the actual form while it closed and re-opened so the user does not see the
form flicker on and off? Below is the code I used. Feel free to offer any
critique or advice, Thanks!
Private Sub funcNextCall_Click()
On Error GoTo Err_funcNextCall_Click
If Me.Frm_Call_Log_subform![Yes/No?] = "" Then
If MsgBox("Do you want to skip this person?", vbYesNo, "Deep Care") =
vbYes Then ' allows user to skip the person on the screen they want
Me.OnScreen = False
DoCmd.Close acForm, "Frm Caller Log"
DoCmd.OpenForm "Frm Caller Log", acNormal, , , acFormEdit,
acWindowNormal
End If
ElseIf Me.Frm_Call_Log_subform![Verify] = 0 Then
MsgBox "You must check one selection before proceeding!", , "Deep
Care" ' checks for one option selected
ElseIf Me.Frm_Call_Log_subform![Verify] > 1 Then
MsgBox "You can only check one call response before proceeding"
'Only one option can be selected
ElseIf Me.Frm_Call_Log_subform![Verify] = 1 Then ' Assures that only
one option was selected
Me.Date_Last_Called = Date ' Updates Date last called to todays
date - Keeps same person from getting called on the same day.
Me.History = 1 ' Flags call history notifier
Me.OnScreen = False
DoCmd.Close
DoCmd.OpenForm "Frm Caller Log"
End If
Thanks for any help!
Exit_funcNextCall_Click:
Exit Sub
Err_funcNextCall_Click:
MsgBox Err.Description
Resume Exit_funcNextCall_Click