I've decided to use VBA to do this rather than macros
Dim Filename As String
Dim FilePath As String
Filename = "Quotation" & " " & Me.JobID
FilePath = "C:\Users\Andy\Desktop\" & Filename & ".pdf"
DoCmd.OutputTo acOutputReport, "Quotation", acFormatPDF, FilePath, ...
Hi Guys
I've tried to create a macro based on another users post from 2020. I want to click a button on my job form, which saves the single report matching the current displayed jobID and saves it as a PDF on the desktop. I would also like the filename formatted as Quotation M00000 where the...
I tried changing the subform to Allow Additions Yes and that stops the error for now and the box is blank.
It would be nice for it to show £0.00 when the other box is blank but not sure how to do it
Why doesnt the parts total box display an error but the box which points to parts total does?
The other box just has =[Job Subform].[Form]![PartsTotal] and this is the one which shows #error. I don't know how to add an IsNull statement to this as its just referencing the other box?
This is the code I put into the box for the line total. Does the code need to go into the other box which is showing the error? Currently this box just points to the other control
Quick question and probably one that is easily fixed
Parts total at the bottom is a calculation from sum of line totals.
If no parts are added to a job this box is empty.
A box on the main screen also refers to this and gives an #error until a part is added.
How do I change the error to £0.00?
Just to show you how it now looks, I've added tab pages to make it more neat so the components section of a job is on its own page. Working fantastic. Really grateful for all your help.
Hi June
That was really helpful ive amended this and prefer it without warnings.
I might do the same when deleting a line but may be useful to prevent accidental deletes
Many thanks, this worked brilliantly. The code I used at the end was
Dim intPartID As Integer
Dim intJobID As Integer
intPartID = Me.PartID
intJobID = Forms![Job Form]![JobNumber]
strsql = "INSERT INTO JobParts (PartID, JobID) Values ( " & intPartID & ", " & intJobID & ")"
Debug.Print strsql...
Update - I've done all the work to add the 2nd subform. I just need the code now to put into the button so when I choose a component from the components table it adds its partID as a record to the jobparts table using the current jobID
Hi everyone,
I've attached a few screenshots of the existing design, and also the last one which is how I filter to look up my jobs. When I look up my jobs I can type into any one of the top boxes and it filters on this keyword, I can then open the job by clicking the button.
I would like to do...
That works as long as you know what you’re searching for which is sometimes difficult as electronic components have part numbers, marking codes, descriptions. Ideally I would like to filter on these multiple fields instead of just a part number combo box then add the desired filtered result to...
Thank you
The (link table?) jobparts links job.jobid & parts.partid and also has a qty field.
Apologies Im not a programmer Ive built this from scratch over the past 3 months and now it all works Im improving bits
The qty used is usually input when adding a part. At present this does nothing...
Hi everyone
I currently have a job form, which has a job parts subform which looks up components from a components table. There is currently part number, description, manufacturer, more specifics, supplier price etc and you look up a part to add by the part number which is a combo box.
This...