making the frmCapture accessible to desktop and other apps.
when you open the form, frmCapture, it will make Access App invisible.
therefore you can use the capturing form anywhere on your desktop or any other applications.
I intentionally did not "hide" Access app since doing this on my test...
then show us the result?
on my understanding with your code, the text "NCE Report.pdf" is being appended to CurrentProject.Path.
in order to save it to the Path, add a backslash ("\") to it.
Wireless network is a No no. You may experience corruption on your db, since wireless connection is not reliable and may drop the connection.
also you are using 4 dlookup on same record which is very expensive over the network.
why not use a recordset:
Dim dbs As DAO.Database
set dbs =...
only comment on the code.
you need to add backslash ("\") to CurrentProject.Path before appending the filename.
DoCmd.OutputTo acOutputReport, "NCE REPORT", acFormatPDF, CurrentProjectPath & "\NCE REPORT.pdf", True
also i read in a book (can't remember the name).
you use dot (.) when you are referencing the "intrinsic" properties of Form/Report.
and use bang (!) on the controls you Added to the form on design view.
btw you cannot, directly, use dot (.) when referencing a field on a recordset object.
you can also ask Copilot or ChatGPT, they have huge database of answers (and keeps on growing).
here's what ChatGPT has to say:
💠 Dot (.) — For properties and methods known at compile-time
Used to access built-in properties, methods, or members of an object that VBA recognizes at compile time...
for labels, you need to put a code on the Report's Load event:
Private Sub Report_Load()
Me!yourLabelName.Caption = Forms!YourFormName!Comboname(2) & " starting on " & Forms!YourFormName!Comboname(3)
End Sub
this is the latest version 3 (frmCapture3).
the code still not documented.
this one has "resizing handle" on each corner.
the minimum width of the form can be resized to 1-1/2 inch,
while the height is 1 inch.
much better than the previous.
this is a second version (using frmCapture2).
the form is transparent and will capture whatever is under
red rectangle.
the width of the form cannot be shrink more from the original size.
while the height can be up to 1 inch (1440 twips)