B
Burden
hi there,
i was wondering if any one can spot what i am doing wrong here.
I have a table which has quite a lot of info in. Some of it being
status changes. These status's range from 1 - 10 and have date fields
next to them. I also have a active status field.
When i click on the button (code below) it changes the active status
field on my form not a problem. But it will not put it in the status1
or the date in the date box.
This button is on another form and when pressed it does its action and
closes. I want it to put the status change (below to be "AL
(Unpicked)") in the active status field and the next available status
field. and put the date that the change took place.
Private Sub Button_AL_Click()
On Error GoTo Err_Button_AL_Click
Dim Status As String
Status = "AL (Unpicked)"
[Forms]![form - touch find]![Active status] = Status
GoTo Statuschange:
Statuschange:
If (Me.Status1) = Null Then [Forms]![form - touch find]![Status1] =
Status: [Forms]![form - touch find]![Date1] = Date: GoTo jump1:
If (Me.Status2) = Null Then [Forms]![form - touch find]![Status2] =
Status: [Forms]![form - touch find]![Date2] = Date: GoTo jump1:
If (Me.Status3) = Null Then [Forms]![form - touch find]![Status3] =
Status: [Forms]![form - touch find]![Date3] = Date: GoTo jump1:
If (Me.Status4) = Null Then [Forms]![form - touch find]![Status4] =
Status: [Forms]![form - touch find]![Date4] = Date: GoTo jump1:
If (Me.Status5) = Null Then [Forms]![form - touch find]![Status5] =
Status: [Forms]![form - touch find]![Date5] = Date: GoTo jump1:
If (Me.Status6) = Null Then [Forms]![form - touch find]![Status6] =
Status: [Forms]![form - touch find]![Date6] = Date: GoTo jump1:
If (Me.Status7) = Null Then [Forms]![form - touch find]![Status7] =
Status: [Forms]![form - touch find]![Date7] = Date: GoTo jump1:
If (Me.Status8) = Null Then [Forms]![form - touch find]![Status8] =
Status: [Forms]![form - touch find]![Date8] = Date: GoTo jump1:
If (Me.Status9) = Null Then [Forms]![form - touch find]![Status9] =
Status: [Forms]![form - touch find]![Date9] = Date: GoTo jump1:
If (Me.Status10) = Null Then [Forms]![form - touch find]![Status10] =
Status: [Forms]![form - touch find]![Date10] = Date
jump1:
DoCmd.RunCommand acCmdSaveRecord
DoCmd.Close
[Forms]![form - touch find].SetFocus
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
DoCmd.RunCommand acCmdSaveRecord
Exit_Button_AL_Click:
Exit Sub
Err_Button_AL_Click:
MsgBox Err.Description
Resume Exit_Button_AL_Click
End Sub
The status fields are not on the form, only in the table, is the
problem?
Burden
i was wondering if any one can spot what i am doing wrong here.
I have a table which has quite a lot of info in. Some of it being
status changes. These status's range from 1 - 10 and have date fields
next to them. I also have a active status field.
When i click on the button (code below) it changes the active status
field on my form not a problem. But it will not put it in the status1
or the date in the date box.
This button is on another form and when pressed it does its action and
closes. I want it to put the status change (below to be "AL
(Unpicked)") in the active status field and the next available status
field. and put the date that the change took place.
Private Sub Button_AL_Click()
On Error GoTo Err_Button_AL_Click
Dim Status As String
Status = "AL (Unpicked)"
[Forms]![form - touch find]![Active status] = Status
GoTo Statuschange:
Statuschange:
If (Me.Status1) = Null Then [Forms]![form - touch find]![Status1] =
Status: [Forms]![form - touch find]![Date1] = Date: GoTo jump1:
If (Me.Status2) = Null Then [Forms]![form - touch find]![Status2] =
Status: [Forms]![form - touch find]![Date2] = Date: GoTo jump1:
If (Me.Status3) = Null Then [Forms]![form - touch find]![Status3] =
Status: [Forms]![form - touch find]![Date3] = Date: GoTo jump1:
If (Me.Status4) = Null Then [Forms]![form - touch find]![Status4] =
Status: [Forms]![form - touch find]![Date4] = Date: GoTo jump1:
If (Me.Status5) = Null Then [Forms]![form - touch find]![Status5] =
Status: [Forms]![form - touch find]![Date5] = Date: GoTo jump1:
If (Me.Status6) = Null Then [Forms]![form - touch find]![Status6] =
Status: [Forms]![form - touch find]![Date6] = Date: GoTo jump1:
If (Me.Status7) = Null Then [Forms]![form - touch find]![Status7] =
Status: [Forms]![form - touch find]![Date7] = Date: GoTo jump1:
If (Me.Status8) = Null Then [Forms]![form - touch find]![Status8] =
Status: [Forms]![form - touch find]![Date8] = Date: GoTo jump1:
If (Me.Status9) = Null Then [Forms]![form - touch find]![Status9] =
Status: [Forms]![form - touch find]![Date9] = Date: GoTo jump1:
If (Me.Status10) = Null Then [Forms]![form - touch find]![Status10] =
Status: [Forms]![form - touch find]![Date10] = Date
jump1:
DoCmd.RunCommand acCmdSaveRecord
DoCmd.Close
[Forms]![form - touch find].SetFocus
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
DoCmd.RunCommand acCmdSaveRecord
Exit_Button_AL_Click:
Exit Sub
Err_Button_AL_Click:
MsgBox Err.Description
Resume Exit_Button_AL_Click
End Sub
The status fields are not on the form, only in the table, is the
problem?
Burden