harleyskater
IT Manager
- Local time
- Yesterday, 23:22
- Joined
- Oct 29, 2007
- Messages
- 95
The copy part of this code works great but I need to set some fields to a default value after the code has ran.
It will be the current record on the form : )
This is part of some VBA code used to copy the record from the current form to a new record. After those 2 functions have ran I want to change 3 of the fields on the new record. I have tried but I do not know the code. I could use a little help on this if anyone has some free time : ) thank you.
It will be the current record on the form : )
This is part of some VBA code used to copy the record from the current form to a new record. After those 2 functions have ran I want to change 3 of the fields on the new record. I have tried but I do not know the code. I could use a little help on this if anyone has some free time : ) thank you.
Code:
Function fCopyPO(lngPOID As Long) As Long
Dim lngNewID As Long
'Create copy of parent PO record
lngNewID = fCopyRecord2("dbo_purchase_orders", lngPOID)
fCopyPO = lngNewID
MsgBox "Copy complete", vbInformation
[COLOR="Yellow"] Me!po_completed = "0"
Me!po_canceled = "0"
Me!po_revised = Null[/COLOR]
End Function
Last edited: