these are just the system's way of spacing the fields when you use auto form-build, it lays out all fields and labels and columns.
you can just copy an existing one and paste where-ever, or use an empty textbox.
Never run single step macro.
just run the macro:
in the macro:
ImportExportSpreadsheet,
excel workbook
queryName
filename
yes
or in VB code:
vFile = "C:\mypath\files\ExportFile.xlsx"
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, "qsMyQuery", vFile, True
in 1 single report that is nothing but subreports,
put in N subrpt boxes each mapped to a report.
hand assign each subrpt to a source,
--- or ----
in a table put in the names of all the reports to use.
in vb , open the report in design, cycle thru the table of reports assign each to a subRpt-N...
usu the form is in a 'state' that cant save due to another process, like currently in an 'edit mode' that has to be completed and return to the form, THEN the save can run.
I get in a form like that, while making changes , i click save, CANT SAVE yet, then simply moving the cursor exits that...
In the form, put a combo box, say: cboCust.
bind its source query to the list of customers,
then a button to open the report ,filtered on that combo,
docmd.openReport ”rMyReport”,,,”[customer]=‘“ & me.cboCust & “‘“
save the report, then email via
dim vDir , vFile
vDir = "c:\temp\
vFile= vDir & "rMyReport.pdf"
'make pdf
DoCmd.OutputTo acOutputReport, "rMyReport", acFormatPDF, vFile
'send rpt
send1email "Coyote@acme.com", "your report","here is your report",vFile
then email it :
Public Function...
Is this db shared? If so, Is it split? (it MUST be split in multi user environ)
Multiple users cannot edit the same record.
Also you cannot add a duplicate rec with the same key.
BUT I have got this error in a single user db, (my db on my pc, no other users)
this is due to the design of the...
you dont need the macro, just make the query:
qsDataNoNull
select * from table where not ([field1] is null)
well then, i guess the macro is: transferspreadsheet ...."qsDataNoNull'....
make a table with ONLY the valid workdays:
tWorkDays
1 , Sun
2, Mon
etc
in the query Q1, add the Day Of Week field: Dow: Format([DateFld],"ddd")
then join tWorkDays tbl to DoW,
Add date range: where [DateFld] Between forms!fMyForm!txtStartDate and forms!fMyForm!txtEndDate
then make Q2...
if you show all records in the form, then cycle thru the controls to see what ones to use.
then filter the records.
(or further down add the filter to a query and open the query. Note: the query must already exist.)
Dim sSql As String, sWhere As String
Dim qdf As querydef
Const kQRY =...
in the query add the form fields:
DteRng: [Forms]![frmReportselection]![txtstDate] & " to " & [forms]![frmReportselection]![txtEndate].
then put field: [DteRng] on the report
in a table tOptValues
1, not seen, or barely seen
2, is seen
3. is clearly seen
this table can be used in a query to translate the opt box.
or to show the text on screen using a combo to show get the text via the value.