ok great i have that working, not sure if i should start a new thread for this now or just keep this one going ? (Please Advise)
i now need the user to make a coice from one of the visible list boxes, the trouble is i am not sure how this will work:
if you select the total time option the approprite box becomes visible...if you then highlight one of the choices... then choose the other option box and highlight one of the choices (the user may have changes their mind which report to run.
if you then select the first option box again the selection remains highlighted from the previous choice...
will this effect anything when running my query.
how do i program the form to run the chosen query ?
is there some useful code floating around to open my query or should i use a macro ?
i have been working on this project all week and now it is almost ready to use i am having problems after saving the file to a previous version..
it was designed in Access 2K and it worked fine i need this in access 97, so i saved it as a prior version of Access and opened it and debugged it and saved the modules, but now when i run it i get a message appear saying,
The action or method requires a query name argument
you tried to open the use openquery action or method, but you left the name argument blank, in the query name argument, enter a query name.
what is this meaning please ? my code is below and i have attached my db
Option Compare Database
Private Sub DisplaySection_AfterUpdate()
Select Case DisplaySection
Me.ByMachine.Visible = True
Me.ByEventcode.Visible = False
Me.ByEventcode.Visible = True
Me.ByMachine.Visible = False
Private Sub cmdRunQuery_Click()
On Error GoTo Err_cmdRunQuery_Click
Select Case Me.DisplaySection
DoCmd.OpenQuery Me.ByMachine.Column(1), , acReadOnly
DoCmd.OpenQuery Me.ByEventcode.Column(1), , acReadOnly
Private Sub DisplaySection_Enter()
If (Len(cboDaycodeStart & vbNullString) = 0) Or (Len(cboDaycodeEnd & vbNullString) = 0) Or (Len(Line & vbNullString) = 0) Then
If (Len(cboDaycodeStart & vbNullString) = 0) Or (Len(cboDaycodeEnd & vbNullString) = 0) Then
MsgBox "Please enter start and end Daycodes"
If (Len(cboDaycodeStart & vbNullString) = 0) Then
ElseIf (Len(cboDaycodeEnd & vbNullString) = 0) Then
If Len(Line & vbNullString) = 0 Then
MsgBox "Please select a line"
Private Sub cmdClose_Click()
On Error GoTo Err_cmdClose_Click