I've used the following on a click event, this should help, it only pick up one student and select that student's report only.
Private Sub cmdWarning_Click()
On Error GoTo Err_cmdWarning_Click
Dim stDocName As String
DoCmd.OpenReport "rptWarning", acPreview, , "[STDNO]=" & [STDNO]...
I really have no ideal, but look at the spaces, maybe they have something to do with it. Here is the code from one of my Delete Button, maybe it will give you an ideal of where to start.
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, ...
Trim deletes any space in front of and behind the field. There is RTrim which will delete the space in the back of the field, and LTrim for the front of the field.
I don't understand, when you run a marcos that has a procedure that export the data as text, then the text used as the datasource for a mail merge document you come get an error?
=IIf([Family Name]<>"",(UCase([Family Name])),(UCase([Title)] & “ “ & UCase([Last Name])))
Try this Simple one first and then add the Trims and UCase
= IIf([FamilyName]="", [FamilyName], ([Title]&" " &[LastName]))
Create a report that can be used and use the primary key as the condition for the print button, for example:
DoCmd.OpenReport "rptWarning", acPreview, , "[STDNO]=" & [STDNO]
This is to preview a report that I created, but I only select the student that have the same StudentID, which is my...
Make sure that the supplier header have a footer section. On the footer section set up a text box that will = Count(supplier header) and name the text box txtsupplierheader , you can set the visibility as no. On the main head group footer you can setup a text box that =txtsupplierheader. Try...
If you name the excel sreadsheet the same name every time, you can go into the excel spreadsheet and set the page setup. Go to the sheet tab and check the gridline and Save. Then everytime the speadsheet is open the gridline will print out. I hope this will help.
On a button click event try this code:
Private Sub cmdEvents_Click()
Dim stDocName As String
stDocName = "Nature Events"
DoCmd.SendObject acReport, stDocName
End Sub
It will send as an attachment to an email.
It will be easier to email a report as an attachmet then to send the form. If each record as a primary key(ID) you can set it up where you will attach only the report pertaining to the form.
Creating a Report
1) Click on Reports/New/Report Wizard
2) select the query you are using for the from...
Create a subform that is linked to the person account number on the master from then display the sum on the subform. Make sure the subfrom is in single form layout.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.