What does this mean: Option Compare Database

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
 
G

Gina Whipp

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
 
M

Marshall Barton

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top