+ Reply to Thread
Results 1 to 2 of 2

Thread: Posting combo box values

  1. #1
    Barn Enthusiast Centurion is on a distinguished road Centurion's Avatar
    Join Date
    Dec 2008
    Posts
    429
    Rep Power
    2

    Posting combo box values

    Hello,

    When are hard code :

    tickets = 1000

    into my page, the code counts the database for values and an IF statement checks if the value is greater than tickets then write a message. It all works fine

    But when i have a different page and construct a form it does not seem to function correctly.

    Code:
    If CInt(availabilityRS("TicketCount")) > tickets Then 
        Response.Write "There are enough tickets in the DB"
    ElseIf CInt(availabilityRS("TicketCount")) < tickets Then
        Response.Write "There are not enough tickets in the DB"
    End If
    
    I also have this on my page:

    Code:
    tickets=request.form("tickets")
    
    which should retrieve the value from the combo box and put it in memory.

    When i response.write what is in 'tickets' i get the correct number, so i think the IF statement doesn't fire properly..?

    Any ideas?

  2. #2
    Super Sarcasm Mistress mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere is a glorious beacon of light mehere's Avatar
    Join Date
    Mar 2008
    Location
    Wide Awake In Dreamland
    Posts
    436
    Rep Power
    7

    try changing to this:
    Code:
    tickets=CInt(request.form("tickets"))
    
    your code could be pulling the value in as text and not a number which would cause your IF statement to misfire.
    Quote of the Month:
    Leaders: Leaders are like eagles. We don't have either of them here.

    Questions to Ponder:
    Why do banks charge you a "non-sufficient funds fee" on money they already know you don't have?

    iif([sarcasm]=true,iif([you have to ask]=true,"didn't work","ha ha ha"),"not sarcasm")
    copyright © 2008 sbenj69

    Sarchasm: The gulf between the author of sarcastic wit and the person who doesn't get it.

+ Reply to Thread

Similar Threads

  1. Disable Combo Box
    By rivergum23 in forum Microsoft Access
    Replies: 1
    Last Post: April 7th, 2009, 09:45 AM
  2. Combo Box
    By Carenas in forum Microsoft Access
    Replies: 9
    Last Post: January 20th, 2009, 08:38 AM
  3. Replies: 0
    Last Post: August 15th, 2008, 05:36 PM
  4. New to ASP? Learn the basics here, before posting a question!
    By jmurrayhead in forum ASP Development
    Replies: 0
    Last Post: August 15th, 2008, 05:33 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

SEO by vBSEO