Re: Combo box

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Like this?

If Not IsNumeric(OK_Quantity) Then
MsgBox"Fill The Correct Quantity",64,"Informasi"
Cancel = True
OK_Quantity.SetFocus

But It doesn't make a sense

"Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx> wrote in message
news:uxdI$ghNHHA.320@xxxxxxxxxxxxxxxxxxxxxxx

Omit the .Text.
Add spaces between your words.
Use the BeforeUpdate event of the control.
Add the line:
Cancel = True
Drop the last line.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"cho" <chooriang@xxxxxxxxx> wrote in message
news:OZJNVGgNHHA.2236@xxxxxxxxxxxxxxxxxxxxxxx
Yes It works Allen,
And What about this code

IfNotIsNumeric (OK_Quantity.Text) Then
MsgBox "Fill the correct quantity",64,"Information"
OK_Quantity.SetFocus

VB highlights the words "Then".What's wrong

"Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx> wrote in message
news:eopKJ3HNHHA.3424@xxxxxxxxxxxxxxxxxxxxxxx
Needs a closing quote at the end of the word Information.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"cho" <chooriang@xxxxxxxxx> wrote in message
news:OrkUrjHNHHA.3552@xxxxxxxxxxxxxxxxxxxxxxx
I have tried like this

MsgBox,vbOKOnly,"Information,64,"Check Model Name You have
Entered"

Response=acDataErrContinue

But no changing occured.What's wrong

"Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx> wrote in message
news:O8P1me#MHHA.1248@xxxxxxxxxxxxxxxxxxxxxxx
If you set the On Not In List property of the combo to:
[Event Procedure]
and click the Build button (...) beside that,
Access will open the code window for you.

Between the "Private Sub..." and "End Sub" lines, you want to type 2
lines:
- The first starts with MsgBox, and then you put in quotes whatever
message
you want the user to see.
- The second is exactly as I showed you.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"cho" <chooriang@xxxxxxxxx> wrote in message
news:OEGJaS9MHHA.4928@xxxxxxxxxxxxxxxxxxxxxxx
Unfortunately I'm blind about VB.
Would you like to write me this time
and,where the good source to study
VB for a beginners.Thank's for helping me.

"Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx> wrote in message
news:OMb9yg8MHHA.1252@xxxxxxxxxxxxxxxxxxxxxxx
Use the Not In List event procedure of the combo.

You can say anything you want with a MsgBox.

Then suppress the built-in message by adding this line:
Response = acDataErrContinue

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"cho" <chooriang@xxxxxxxxx> wrote in message
news:uB1FoK6MHHA.992@xxxxxxxxxxxxxxxxxxxxxxx
Thank's Allen,it works but,
I want to change the content of the error essage,
would you like to help me with the code.



"Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx> wrote in message
news:#bp56c5MHHA.4912@xxxxxxxxxxxxxxxxxxxxxxx
Set the Limit To List property of the combo to Yes.

"cho" <chooriang@xxxxxxxxx> wrote in message
news:eQtvjS5MHHA.5000@xxxxxxxxxxxxxxxxxxxxxxx
Hi,
I put a combo box in my form as the input data.
How to restricted the input data base to the data
listed in the combo box only,so that if somebody
try to input data which are not listed in combo box,
the form automatically denied to save the record.Thank's







.



Relevant Pages

  • Re: Copy a record to a new record in the same table with a button on form
    ... Allen Browne - Microsoft MVP. ... Perth, Western Australia ... Tips for Access users -http://allenbrowne.com/tips.html ...
    (comp.databases.ms-access)
  • Re: Prefix to Autonumber
    ... Allen Browne - Microsoft MVP. ... Perth, Western Australia ... Tips for Access users - http://allenbrowne.com/tips.html ...
    (comp.databases.ms-access)
  • Re: Find thread on Best match for names
    ... Perth, Western Australia ... Tips for Access users - http://allenbrowne.com/tips.html ... Though the Soundex algorithm is interesting, it is not quite what I am ...
    (comp.databases.ms-access)
  • Re: Combo box
    ... Perth, Western Australia ... Tips for Access users - http://allenbrowne.com/tips.html ... I put a combo box in my form as the input data. ...
    (microsoft.public.access.forms)
  • Re: Combo box
    ... Perth, Western Australia ... Tips for Access users - http://allenbrowne.com/tips.html ... I put a combo box in my form as the input data. ...
    (microsoft.public.access.forms)