Hello All, I have a somewhat complicated programming issue here. I know what I want to do but need some ideas on how to accomplish it. This will all be based on the OnClick event of a button on my form.
Step 1: I want VBA to go to the last record in a query and add 1 to a field. This will be similar to an autonumber field but be different because it will reset at 1 when a new customer is being queried. So customer "A" will have 1, 2, 3..... and Customer "B" Will have 1, 2, 3.... and so on. (For reference this is the "Beam Number")
Step 2: I want VBA to remember this number and when I print 3 separate reports it will use this as a field on my reports.
Step 3: It will then loop back through and repeat these steps as many times as an unbound control on my form dictates.
I already have the final part finished.
Dim stDocNameRA As String
Dim stDocNameDIF As String
Dim stDocNameAD As String
Dim intCounter As Byte
'Calls out all Reports Needed
stDocNameRA = "Record of Accomplishment"
stDocNameDIF = "Dimesional Inspection Form"
stDocNameAD = "Assembly Drawing"
'Loop Reports Until number in QTY box is hit
Do
intCounter = intCounter + 1
DoCmd.OpenReport stDocNameRA, acNormal
DoCmd.OpenReport stDocNameDIF, acNormal
DoCmd.OpenReport stDocNameAD, acNormal
Loop Until intCounter = QTY
Any help or ideas would be greatly appreciated.