Form control

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
 
M

mscertified

You can pass information to the form in the OpenArgs argument of the OpenForm
statement. Look it up in Access help.

-Dorian
 
D

Dave

Thanks Douglas and Jeff that was so quick, wow!
Yes have modiied a field in the BE and the modified field appears in the
front end automatically.
I have some input forms that need updating now.
Is it best to just delete the old fied from the form and drag in the new one
from the changed filed list or is there a better way?
Cheers, David
 
D

Dave

Oops stupid me
not trying to hijack your post just posted to the wrong thread, sorry!
dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top