Combobox question

  • Thread starter Thread starter Clay Forbes
  • Start date Start date
C

Clay Forbes

Ok, i have tried a couple different things but i can not figure out
how to make it so when user clicks cmd button it checks to see if
combo3 is empty.
 
Clay

How is this a "queries" newsgroup question?

Jeff Boyce
<Access MVP>
 
Wrong Group, but assuming that the button and the combo are on the same form you
can check the combobox value

If Len(Me.Combo3 & vbNullstring) = 0 Then
'NEVER MIND
Else
'Execute the existing code

End if
 
Its not. Does it need to be? if so can you give me the name of a group
that i should post it to?
 
microsoft.public.access.forms or microsoft.public.access.formscoding
 
what does the expression Len mean?

John Spencer (MVP) said:
Wrong Group, but assuming that the button and the combo are on the same form you
can check the combobox value

If Len(Me.Combo3 & vbNullstring) = 0 Then
'NEVER MIND
Else
'Execute the existing code

End if
 
It is a function that returns the LENgth of a string.

So if your combo is null or contains a string the is zero-characters long, the
function will return zero. Adding a zero-length string (vbNullString) to a null
gives you a zero-length string and add a zero-length string to a zero-length
string also gives you a zero-length string.
 

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

Back
Top