a control is not an event /nor value, so dont use : Select Case ctrl
for every button CLICK EVENT
send a parameter value to ToNoteButton(pvVal)
sub btnVM_click()
ToNoteButton 1
end sub
sub btnSI_click()
ToNoteButton 2
end sub
Public Function ToNoteButton(pvBtnValu)
select case...
make a query based on your table that makes the groups say: qsGrpData
select *, Left([code],3) as Group, Format([mo] & "/1/2000","mmm") as MonthName from table
now you can produce crosstabs or other groups using qsGrpData.
your query is labeled: Women Radio Membership DB Query, but it pulls only Men so.....shouldnt it be : Men Radio Membership DB Query
Dont you also need a table to track Membership dates , BeginDate, ExpireDate to know when membership expires?
What about payments?
another way:
Public Sub btnOpenRpt_Click()
Dim sSql As String, sWhere As String
sWhere = "1=1"
'the query is built depending on the various filters the user picks...
If Not IsNull(cboState) Then sWhere = sWhere & " and [state]='" & cboState & "'"
If Not IsNull(txtName) Then sWhere =...
on the form ( fMyForm), a combo box holds ORIGIN items.
also a subform that holds the list of all Products
the list has the PRODUCT field and CHOSEN check box
user selects the origin & checks all Products wanted.
then clicks a CREATE button
this runs an append query i.e:
INSERT INTO...
in the query add these calculations to get amts per CommType:
select [field], AgentAmt: IIf([field]="Agent",[Amt],0) ,AdminAmt: IIf([field]="Admin",[Amt],0)... from table
then sum in the footer:
=Sum(AgentAmt)
=Sum(AdminAmt)
if the sub is in the form, and you call it from the form, you can just use: formulaire2
RechercherProcedure () not needed
if you are calling formulaire2 from outside the the form, then make the procedure public:
PUBLIC sub formulaire2()
end sub
then you can call it from anywhere...
you should be able to use code:
DoCmd.SendObject acSendReport, "rTest", acFormatPDF, "w.e.coyote@ACME.com", , , "Subject", "message"
tho, some older Access versions may not be able to use PDF. but you can use RTF ( acFormatRTF )
These work for me.
only page 1 shows the section data.
'PAGE FOOTER
Private Sub PageFooterSection_Print(Cancel As Integer, PrintCount As Integer)
Me.PageFooterSection.Visible = (Me.[Page] = 1)
End Sub