Comparing variables

Results 1 to 3 of 3

Thread: Comparing variables

  1. #1
    JustinS Guest

    Default Comparing variables

    Hiyas all,<BR><BR>I am having problems with the line below. It refuses to compare the contents of rs("reversed") and reversed. I have outputted the contents of both numeric variables within the loop and they _do_ match (and no reversed shouldn&#039t have a (count) after it ;)<BR><BR>If I change the field "reversed" in the MS Access database to a text field the code executes properly, if however "reversed" is left as a number field then the code does not find a match. =(<BR><BR>If Rs("agentname") = agentname(count) AND Rs("reversed") = reversed Then<BR><BR>I have tried using various symbols around Rs("reversed") such as &#039 and # but either the code does not execute or I get a syntax error.<BR><BR>Any/All help is greatly appreciated,<BR><BR>Cheers,<BR><BR>Justin

  2. #2
    Join Date
    Dec 1969

    Default RE: Comparing variables

    Try adding the .Value property name to RS("reserved")<BR><BR>i.e., ... AND Rs("Reserverd").Value = reserved Then ...<BR><BR>Let me know if that does or does not work. Happy Programming!

  3. #3
    JustinS Guest

    Default RE: Comparing variables

    Cheers for the help Scott =)<BR><BR>I just tried what you said and it does exactly the same thing - submits the data to the database. I&#039ve been running comparison tests on this problem for hours and hours. <BR><BR>I also tried inserting the value of CRset("reversed") (field: reversed2) back into the database along with the value of "reversed" and yep .. they match exactly. It&#039s a strange one, as the page works quite happily if I just change the "reversed" field to a text field. Odd.<BR><BR>I&#039ll keep trying - i&#039ve got loads to do yet after this page but it&#039s bugging me so much I can&#039t move on until I know the reason WHY ;)<BR><BR>Cheers,<BR><BR>Justin<BR><BR>PS: I&#039ll keep you posted - pls let me know if you&#039ve got any other suggests or would like to see the full code.

Posting Permissions

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