troubleshooting Question

Transferring a Macro into Visual Basic code.

Avatar of gigifarrow
gigifarrow asked on
Microsoft Access
8 Comments3 Solutions482 ViewsLast Modified:
I have a macro that is used after update.


I need to transfer that into Visual basic code Because I need to add more code that is in visual basic.

This is the Macro I need Transfered into visual basic:
After_Update_MOD
Action                                          Argument
Set Value                [Forms]![frmVehicleMOD]![Part Number], DLookUp                   ("[PartNumber]","[tblMODKits]","[MOD Kit]= Forms![frmVehicleMOD]![MOD]")

Set Value                     [Forms]![frmVehicleMOD]![MWO], DLookUp("[MWO]","[tblMODKits]","[MOD Kit]= Forms![frmVehicleMOD]![MOD]")



Once the code does this I am adding the following code which is based on what the output of the Macro below displays:

If Me.MOD = "BFCS" Then
MsgBox "Please Enter Fuel Cell Information." Then

DoCmd.OpenForm "frmfuelCellInfo"

If Me.MOD = "AFES CEP Protective  Switch Guard" Then
MsgBox "Please Enter Fuel Cell Information."

DoCmd.OpenForm "frmfuelCellInfo"


End If
End If

End Sub
ASKER CERTIFIED SOLUTION
ramrom
consultant

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros