https://drive.google.com/open?id=1EE...u9xkqA1N1TAjvm
Code:
Private Sub Knop179_Click()Dim FileName As String
Dim FilePath As String
FileName = Me.Geneesmiddel & Me.Id
FilePath = "C:\Users\managergal\Desktop\printscreens" & FileName & ".pdf"
DoCmd.OutputTo acOutputReport, "rptCurrentGeneesmiddel", acFormatPDF, FilePath, False
MsgBox "Wijzigingen opgeslagen en versiegeschiedenis geupdate"
DoCmd.RunCommand acCmdSaveRecord
DoCmd.Close
End Sub
this what i did, but it doesnt save the report. the code seems to be working but the output folder stays empty.
Code:
SELECT Overzichtstabel.Id, Overzichtstabel.Geneesmiddel, Overzichtstabel.KNMPNummer, Overzichtstabel.Cassettenummer, Overzichtstabel.Uiterlijk, Overzichtstabel.GevaarlijkeStof, Overzichtstabel.AdviesOntstrippenStofafzuiging, Overzichtstabel.AdviesSTSOnderStofafzuiging, Overzichtstabel.CassetteBijvullen, Overzichtstabel.Zwangerschapsbeleid, Overzichtstabel.Vorm, Overzichtstabel.Breukgleuf, Overzichtstabel.PotStrip, Overzichtstabel.SoortStrip, Overzichtstabel.[HoudbaarheidNaOpenenFabrikant (mnd)], Overzichtstabel.HoudbaarheidKoertGDS, Overzichtstabel.Lichtgevoelig, Overzichtstabel.Opiumwetregistratie, Overzichtstabel.HoudbaarheidInDagenGDSKoert, Overzichtstabel.[Ingevoerd door], Barcodes.Barcode, GPKTabel.GPKNummerFROM (Barcodes INNER JOIN Overzichtstabel ON Barcodes.KNMPNummer = Overzichtstabel.KNMPNummer) INNER JOIN GPKTabel ON Overzichtstabel.KNMPNummer = GPKTabel.KNMPNummer
WHERE (((Overzichtstabel.Id)=[Formulieren]![Geneesmiddelbewerkformulier]![Id]));
this is the code for the record selection, that works fine
is it possible to add dates to the filenames(also to prevent duplicate filenames)
when in reportview, it displays the reprort 2 times under eachother, is this normal?