dumber
01-14-2008, 12:19 PM
Hello everyone.=) I've done nearly my whole db project, but the thing is that most of the commands are in macro code and i have no idea how to change it to vba...i need to change to vba to get more points basically...=) can anyone please show me examples of code for commands like next, previous, delete record, new record, close db, open and close forms...thanks
P.S
sorry if thats too much lol, but i don't think thats hard to write that code=)
rainman89
01-14-2008, 12:21 PM
its not hard. look it up there are many many sites that will show you how to do this
RuralGuy
01-14-2008, 02:05 PM
Have you tried highlighting a Macro and going to Tools>Macro>Convert Macro to Visual Basic??
dumber
01-15-2008, 03:55 AM
thanks everyone... after coverting the macro i get this code:
Private Sub cmdGoPrevious_Click()
On Error GoTo Err_cmdGoPrevious_Click
DoCmd.GoToRecord , , acPrevious
Exit_cmdGoPrevious_Click:
Exit Sub
Err_cmdGoPrevious_Click:
MsgBox Err.Description
Resume Exit_cmdGoPrevious_Click
End Sub
isn't this stil a macro code coz it has DoCmd in it?
RuralGuy
01-15-2008, 04:03 AM
Nope! That's what the code would look like. Welcome to the wonderful world of coding. :D