More than likely, but there is a huge difference in help found for VBA as opposed to Macros.but I'm sure something will still cause me a problem
More than likely, but there is a huge difference in help found for VBA as opposed to Macros.but I'm sure something will still cause me a problem
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
Use converted macros for guidance where you pick up clues that you research, but some of the converted code is what I would call verbal diarrhea. So don't adopt too much of its format or style.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
It would be the same if you recorded an Excel macro.
However it will still work I expect, just do not use the converted code as learning examples entirely.
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
Look at it this way.
If I suddenly decided I wanted to raise bees, and joined a bees forum, there are likely ready made hives that I could buy at a premium, but you would tell me, you don' need this, you don't need that etc.
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
Using VBA your requirement is very simple.
In the load event of the form:
Code:If Me.NewRecord then 'set your labels for new records else 'set you labels for editing end if
If this helped, please click the star * at the bottom left and add to my reputation- Thanks
I think what Micron is referring to is the extra stuff that converting adds to the code that isn't necessarily needed.Well, That doesn't give me a warm fuzzy feeling.
for instance the VBA:
when converted from a macro :Code:Private Sub Command140_Click() DoCmd.OpenForm "Form1", , , , acEdit End Sub
Code:'------------------------------------------------------------ ' Command140_Click ' '------------------------------------------------------------ Private Sub Command140_Click() On Error GoTo Command140_Click_Err DoCmd.OpenForm "Form1", acNormal, "", "", acEdit, acNormal Command140_Click_Exit: Exit Sub Command140_Click_Err: MsgBox Error$ Resume Command140_Click_Exit End Sub
If this helped, please click the star * at the bottom left and add to my reputation- Thanks
I have no issue with error handlers such as in that converted code. In fact, if you modify application settings I consider them necessary. For me the converted code isn't great for learning how to concisely name variables or line labels and I suspect it would never set Option Explicit either. Besides, you'll never be able to do many things with vba if all you learn from is converted code, because many things can't be done with those macros in the first place. That last point would be my major one. Or maybe it would be the fact that when a macro bombs out there is no recovering from it (at least there wasn't when I stopped using them long ago).
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
ur a great teacher micron like my french teacherdiscourage is not the way to support
vba has many search result and macro seems not