B
blake7
Hi , is it possible to write code behind a button for something to happen in
another form, i have a form (Issue Count1) with a graph, the graph is linked
to a select query, i am running the open form from a command button in
another screen(view graph) , the graph simply displays the data i want and
works fine. It is displaying issues between two dates, I have a series of
twelve command buttons, one for each month amd would like the command button
when pressed to place the current month at the top of the form (Issues
count1) in a text field. The code behind the button is as follows: Thanks
Tony. hope you understand !!
Private Sub August_Click()
Me.DateStart = "01/08/2008"
Me.DateEnd = "31/08/2008"
On Error GoTo Err_Command151_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Issues Count1"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command151_Click:
Exit Sub
Err_Command151_Click:
MsgBox Err.Description
Resume Exit_Command151_Click
End Sub
another form, i have a form (Issue Count1) with a graph, the graph is linked
to a select query, i am running the open form from a command button in
another screen(view graph) , the graph simply displays the data i want and
works fine. It is displaying issues between two dates, I have a series of
twelve command buttons, one for each month amd would like the command button
when pressed to place the current month at the top of the form (Issues
count1) in a text field. The code behind the button is as follows: Thanks
Tony. hope you understand !!
Private Sub August_Click()
Me.DateStart = "01/08/2008"
Me.DateEnd = "31/08/2008"
On Error GoTo Err_Command151_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Issues Count1"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Command151_Click:
Exit Sub
Err_Command151_Click:
MsgBox Err.Description
Resume Exit_Command151_Click
End Sub