I have a command button on a form but need to include value 21 as well. (where a.status = 20 or 21)
Secondly if no records are returned I want to abort the sub routine otherwise I get a blank form.
Private Sub ChargesFilter_Click()
If Me!ChargesFilter.Caption = "Click to show Charges to be applied" Then
Me.Filter = "[a.Status] = 20"
Me!ChargesFilter.Caption = "Show All"
Me!LatestStatus.BackColor = vbCyan
FilterOn = True
If Me!ChargesFilter.Caption = "Show All" Then
Me.FilterOn = False
Me!ChargesFilter.Caption = "Click to show Charges to be applied"
Me!LatestStatus.BackColor = vbWhite
Beware when using the ListIndex and the Column() properties of a listbox in Access 2007. A bug has been identified in the Access 2007 listbox code which can cause the .ListIndex property to return a -1, and the .Columns(#) property to return a NULL…
Usually, rounding is performed by some power of 10 - to thousands, hundreds, tens, or integer - or to one, two, or more decimals. But rounding can also be done to a power of two, say, 16 or 64, or 1/32 or 1/1024, even for extreme values.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…