text box values not passing to query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • iheartvba
    New Member
    • Apr 2007
    • 171

    text box values not passing to query

    Hi this is a query made using access query builder:

    Code:
    SELECT tblBank.BankID, Now() AS TimeRecd, Val(Right(nz([SerialID],0),3)) AS ConsID, "AutoCASH" AS RecUser, tblBank.Dt, Forms!frmRecCASHRunningBal!tbGroup AS GroupID
    FROM tblBank
    WHERE (((tblBank.Dt)>([Forms]![frmRecCASHRunningBal]![tbBankMinDate]-1) And (tblBank.Dt)<([Forms]![frmRecCASHRunningBal]![tbBankRecDate]+1)));
    1.tblBank has a record in the Dt field which equals = 02/07/08
    2. tbBankMinDate -1 = 01/07/08
    3. tbBankRecDate + 1 = 03/07/08
    4. Both tbBankMinDate and tbBankRecDate are formated to be date
    5. A very similar query is running properly where the date is filtered exaclty the same way only using different text boxes.
    6. The above query was working fine a few days ago.


    Thanks in advance
  • nico5038
    Recognized Expert Specialist
    • Nov 2006
    • 3080

    #2
    Are you sure that the frmRecCASHRunni ngBal hasn't been renamed, or that the query is executed from another form ?

    Nic;o)

    Comment

    • iheartvba
      New Member
      • Apr 2007
      • 171

      #3
      Hi Nico,
      1.There has been no renaming of any forms or text boxes
      2. There is no problem with the execution of the query only with the date filters being passed to the query via the text boxes on the form.
      3. The text boxes definatley have the correct data in them

      Comment

      • iheartvba
        New Member
        • Apr 2007
        • 171

        #4
        uuuhmm. Hmmm. mmm. It's working now. I haven't changed anything. Ok. I think it was computer gremlins or something :S

        Comment

        • nico5038
          Recognized Expert Specialist
          • Nov 2006
          • 3080

          #5
          Or your database is getting "corrupt".
          Best to make regular backups and execute a Compact&Repair once in a while.

          Nic;o)

          Comment

          • iheartvba
            New Member
            • Apr 2007
            • 171

            #6
            Yes I also think My Database is getting Corrupt

            Originally posted by nico5038
            Or your database is getting "corrupt".
            Best to make regular backups and execute a Compact&Repair once in a while.

            Nic;o)
            Q1. Why does A database get corrupt?
            Q2. What can one do apart from Compact & Repair to stop a database from getting corrupt?
            Q3. Is The Front End or Back End of an Access Database more likley to get corrupt?


            Thanks Nico, Much Appreciated

            Comment

            • nico5038
              Recognized Expert Specialist
              • Nov 2006
              • 3080

              #7
              This FAQ might answer all (and even more) questions you might have on corruption. Just check the text and links:
              Corrupt Microsoft Access MDBs FAQ

              You can create a corrupt database by deleting a form and creating a new one with the same name in the same session, but that's not the only cause....

              Nic;o)

              Comment

              • iheartvba
                New Member
                • Apr 2007
                • 171

                #8
                Wow! No Wonder programmers get paid so much. There's a lot that can go wrong in any step during developing, implementing or during use of a software. This Guide seems very helpfull I'm sure I will be reading it thoroughly.

                Thanks Nico

                Comment

                • nico5038
                  Recognized Expert Specialist
                  • Nov 2006
                  • 3080

                  #9
                  Glad I could help. When you create regularly backups (I normally do before starting a main change) you would be on he safe side.

                  Success !

                  Nic;o)

                  Comment

                  Working...