Gina it not changing the amount of records in my List Box [lstModify] it
is playing around [#Name!]with my Record Source that I have a couple of
yes/no fields to on this form...thanks for your help Bob.
Private Sub cmdInvoices_Click()
If Me.cmdInvoices.Caption = "Show All Years" Then
Me.cmdInvoices.Caption = "Show Last Year"
Me.RecordSource = "qryClientOnlyYear"
Else
Me.cmdInvoices.Caption = "Show All Years"
Me.RecordSource = "qryClientOnly"
End If
End Sub
Gina Whipp said:
Bob,
I see you have a command button on your form. (I missed that in your
earlier post.) Place the code behind the On_Click event and where it
says YourCommmanButtonName place the name of your command button.
--
Gina Whipp
"I feel I have been denied critical, need to know, information!" -
Tremors II
Gina Im a little bit lost do I add a command button to my form or do I
alter the command button I already have that opens my form?
When you say place behind, in that OnClick of the Command Button?
thanks for your help.Bob
Oops boo-boo, please use this one....
If Me.YourCommandButtonName.Caption = "Show All Years" Then
Me.YourCommandButtonName.Caption = "Show Last Year"
Me.RecordSource = "qryClientOneYear"
Else
Me.YourCommandButtonName.Caption = "Show All Years"
Me.RecordSource = "qryClient"
End If
--
Gina Whipp
"I feel I have been denied critical, need to know, information!" -
Tremors II
Bob,
Try this...
Set the record source of your form to qryClient. Create a command
button and paste this code behind it.
If Me.YourCommandButtonName.Caption = "Show All Years" Then
Me.cmdShowPaid.Caption = "Show Last Year"
Me.RecordSource = "qryClientOneYear"
Else
Me.cmdShowPaid.Caption = "Show All Years"
Me.RecordSource = "qryClient"
End If
--
Gina Whipp
"I feel I have been denied critical, need to know, information!" -
Tremors II
I have a continuous form that shows all my Invoices (Records) but
after 3 years the records 2800 takes a few seconds to load up each
time I open the form,The Row source is qryClient, but I have created
another qryClientOneYear which sorts my records to the last year, My
question is how do I create a toggle so as I can choose which query
I would like to run in my continuous form?