very basic question 2 part question

Results 1 to 2 of 2

Thread: very basic question 2 part question

  1. #1
    ikititeiru Guest

    Default very basic question 2 part question

    PART 1<BR>I have a table (in Access) with the following txtNumber field:<BR>123-456-7890<BR><BR>the user inputs a query through a form to find the last 4 digits: 7890 (txtValue)<BR><BR>How do I go about querying this? Is the foolwing statement possible?<BR><BR>number_SQL = "SELECT * FROM xxx WHERE RIGHT(txtNumber,4) LIKE&#039;" & request("txtValue") & "%"<BR><BR>PART 2<BR>How can I display info from a database in bulleted form? If the info is coming from a field called txtComments with type of Memo?

  2. #2
    Doh! Guest

    Default RE: very basic question 2 part question

    Have you tried your SQL to see if it will work? Here is one way, though certainly not the most elegant or efficient:<BR><BR>SELECT * FROM xxx WHERE txtNumber LIKE &#039;%-"&request("txtValue")&"%&#039;<BR><BR>I&#039;l l bet if you played a little, you could find a better way, but I won&#039;t do it for you! :)<BR><BR><BR>As For bulleted lists:<BR><BR>&#060;ul&#062;<BR>&#060;%<BR> Do While Not objRS.EOF<BR> Response.Write "&#060;li&#062;"&objRS("foo")<BR> objRS.MoveNext<BR> Loop<BR>%&#062;<BR>&#060;/ul&#062;<BR>

Posting Permissions

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