What does this mean: Option Compare Database

  • Thread starter Thread starter forest8
  • Start date Start date
F

forest8

Hi there


I am trying to programming an OnClick event but before it launches this
event takes place and I'm not sure what it means. Can someone explain this
event for me please

Option Compare Database

Me.MyCombo.Column (1)

Private Sub C1_Click()

End Sub

Thank you in advance
 
forest8,

Option Compare Database tells your code how to compare strings, numbers,
etc. Option Explicit tells your code that each variable needs to be defined
for it to be used. This is very important... make sure they're at the top
of each module (commented code (in green, something like: 'commented code)
can go before these, or empty spaces, but nothing else.

However, your Me.MyCombo.Column (1) does not seem to be *attached* to
anything OR is there a line above it missing.

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
forest8 said:
I am trying to programming an OnClick event but before it launches this
event takes place and I'm not sure what it means. Can someone explain this
event for me please

Option Compare Database

Me.MyCombo.Column (1)

Private Sub C1_Click()

End Sub

VBA statements must be between the Sun/Function and End
Sub/Function statements.

The line you have (in the wrong place) is not a statement.
It is just a reference to a value in a row source and you
need to specify how that vaalue should be used.
 
Back
Top