A
Afrosheen
First of all, thanks for reading my question.
I have a combo box called [shift]. Part of the combo infomation is either
A-Days or B-Days. These are rotations. So you have to select either one. Once
selected it will come up with the correct information. Now here is what I
want to do.
I want to take the information and store it probably to a string. If I
change the combo box infomation, then when I click on my "Save Record"
Command it will check to see if the information in the combo box is the same
information as the stored string. If it is then exit. If not then it requery
the form and set it on the proper rotation. I don't need it to requery every
single time I click on the check box. Just when the [shift] information
changes. I hope I've explained my self correctly.
Here is part of the program:
Private Sub cmdSave_Click()
10 On Error GoTo Err_cmdSave_Click
11 Dim lngpos As Integer
12 lngpos = Me.Recordset.AbsolutePosition
20 DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, ,
acMenuVer70
30 DoCmd.OpenForm "frmubeensaved", acNormal, "", "", acReadOnly,
acNormal
40 DoCmd.RepaintObject acForm, "frmubeensaved"
45 Forms!frm_roster.Requery
48 Me.Recordset.AbsolutePosition = lngpos
Exit_cmdSsave_Click:
50 Exit Sub
Err_cmdSave_Click:
60 Call LogError(Err.Number, Err.Description, "cmdsave_click()")
70 Resume Exit_cmdSsave_Click
End Sub
I have a combo box called [shift]. Part of the combo infomation is either
A-Days or B-Days. These are rotations. So you have to select either one. Once
selected it will come up with the correct information. Now here is what I
want to do.
I want to take the information and store it probably to a string. If I
change the combo box infomation, then when I click on my "Save Record"
Command it will check to see if the information in the combo box is the same
information as the stored string. If it is then exit. If not then it requery
the form and set it on the proper rotation. I don't need it to requery every
single time I click on the check box. Just when the [shift] information
changes. I hope I've explained my self correctly.
Here is part of the program:
Private Sub cmdSave_Click()
10 On Error GoTo Err_cmdSave_Click
11 Dim lngpos As Integer
12 lngpos = Me.Recordset.AbsolutePosition
20 DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, ,
acMenuVer70
30 DoCmd.OpenForm "frmubeensaved", acNormal, "", "", acReadOnly,
acNormal
40 DoCmd.RepaintObject acForm, "frmubeensaved"
45 Forms!frm_roster.Requery
48 Me.Recordset.AbsolutePosition = lngpos
Exit_cmdSsave_Click:
50 Exit Sub
Err_cmdSave_Click:
60 Call LogError(Err.Number, Err.Description, "cmdsave_click()")
70 Resume Exit_cmdSsave_Click
End Sub