If you work with a lot of macros and are trying to learn VBA for Access. Goto Tools - Macro - Convert Macro to VBA. It is fully automatic, once it is done you can look at the module that is created to help you get to know VBA syntax.
For instance a dlook up macro that looks like this:
SetValue
[Forms]![TimeEntry]![JobName]
DLookUp("[jobname]","jobnumbers","[jobnumber]=forms![TimeEntry]![jobnumber]")
converts to a module like this:
Function UpdateJob()
On Error GoTo UpdateJob_Err
Forms!TimeEntry!JobName = DLookup("[jobname]", "jobnumbers", "[jobnumber]=forms![TimeEntry]![jobnumber]")
UpdateJob_Exit:
Exit Function
UpdateJob_Err:
MsgBox Error$
Resume UpdateJob_Exit
End Function
------------------
Building the
Ultimate site list for PC support.
[This message has been edited by Talismanic (edited 07-11-2000).]