- Local time
- Today, 13:36
- Joined
- Feb 19, 2002
- Messages
- 47,822
Also, don't forget that if you are having to create controls on the fly, there is something very wrong with your design.
Yes if someone is building controls because there database is changing, but that is probably not what someone would be doing. More likely a nifty display of data that you cannot do in a native form.don't forget that if you are having to create controls on the fly, there is something very wrong with your design.
Disagree - the feature was very useful at times when using customised Word documents. Multiple tab instances according to need were a deliberate part of the design.Also, don't forget that if you are having to create controls on the fly, there is something very wrong with your design.
I'd just like to thank Isladogs for starting this thread. Has been extremely useful, especially where it is reminding me of things I know but had forgotten!
1. But if you have an error handler and you get the error message you may not know exactly where that code is failing. So you can switch it to break on all errors and have it break without having to comment out the Error handler. Then switch back once fixed. However, if you forget to change back you might think your error handler is not working if "break on all errors" is selected.
SetOption "Error Trapping", < values in 0, 1, or 2 >
Public Enum enErrTrap
et_Show = -1
et_All
et_Class
et_Unhandled
End Enum
Public Function ErrTrap(Optional Value As enErrTrap = et_Show) As enErrTrap
If Value = -1 Then
' display current setting
Select Case GetOption("Error Trapping")
Case et_All: Debug.Print "All"
Case et_Class: Debug.Print "Class"
Case et_Unhandled: Debug.Print "Unhandled"
End Select
Else
SetOption "Error Trapping", Value
End If
ErrTrap = GetOption("Error Trapping")
End Function
Sub StartErrorProneProcess()
ErrTrap et_All
ProneToError
ErrTrap et_Unhandled
End Sub
Sub ProneToError()
On Error Resume Next
Debug.Print 1 / 0
End Sub
The "A" stands for application and that is what defines the object model. All versions of VBA have a different object model and different ways of accessing those objects. So, VBA code to access Word objects has to be translated when the code is used in Access. You cannot use the reference method that Word uses.they are all VBA but the Application that VB is embedded in is a Compiler.
Can't tell if you are agreeing with me, disagreeing with me, or just commenting! The point I was making is that the VB engine is the same whatever the application, it's just the embedding that changes.The "A" stands for application and that is what defines the object model. All versions of VBA have a different object model and different ways of accessing those objects. So, VBA code to access Word objects has to be translated when the code is used in Access. You cannot use the reference method that Word uses.
I was trying to be specific on where the differences lie.Can't tell if you are agreeing with me, disagreeing with me, or just commenting! T