Search results

  1. B

    Trouble displaying "0"

    Hi, I can now get my number to display as 9.09, since dimensioning my numbers as strings, but I'm back to my original problem....I can't get them to add: 'dblNum2 = 9.09 + 9.09 dblNum2 = CDbl(dblNum1) + CDbl(dblNum2) gives error: "Cast from string '9.099.09' to type 'Double' is not valid...
  2. B

    Trouble displaying "0"

    Thank you for your response, Wayne! I will store my numbers as strings. I did it that way first, but then had problems adding them, so I reverted to numbers. I'll give it another shot with strings. Thanks, BJS
  3. B

    Trouble displaying "0"

    I am coding a calculator within my application. The field txtResult on my form displays the numbers as they are being clicked and the results of the math. My problem is: This works: pressing 9.99 on the calculator displays 9.99 This does not work: pressing 9.09 displays 9.99 instead of 9.09...
  4. B

    Display Decimal

    Hi, I am creating a basic calcualtor within my Access application. I'm having trouble assigning the value "0." to num1 When the caluclator loads, num1 = 0, and num2 = 0. When clicking on the "decimal" button, I would like the value of "lblResult" label to display "0." and num1 should equal...
  5. B

    Need help with SQL

    Pat.....your code did work for me after all. The first time I put it in, it still didn't read the value of the combo box. I tried it again later, and it worked perfect! THANK YOU VERY VERY VERY VERY MUCH! You have taken the stress out of my life with this one! I can't believe how much time I...
  6. B

    Need help with SQL

    Pat, I replaced my code with yours and this is now the result of my strSQLString: tblShipments.PortID = 17 AND tblShipments.CountryID = "" AND tblShipments.BLDate Between #1/1/2001 12:00:01 AM# AND #1/2/2003# It is still not seeing the value of the combo box item I entered into the cbocountry...
  7. B

    Need help with SQL

    THANK GOODNESS....HELP HAS ARRIVED! Pat, I have the property settings set for the combo box, exactly as you describe. I put a text box on my form to display the value of strSQLString, which is my criteria in the SQL Statment behind the FILTER BUTTON on my form: Here is what the text box...
  8. B

    Need help with SQL

    PLEASE HELP! I am doing some testing to narrow down the problem. I created a simple query: using ShipmentId field and CountryId field, both from tblShipments. I set the criteria for the CountryId = [Forms]![frmMain]![cboCountry]. cboCountry is an unbound combo box on frmMain. When running...
  9. B

    Need help with SQL

    Well, I'm still trying to figure this one out. I think it is a problem with this statement: If Not IsNull(cboCountryId) Then If Not strSQLFilter = "" Then strSQLFilter = strSQLFilter & " AND tblShipments.CountryID = " & [cboCountryId] Else strSQLFilter = strSQLFilter & " tblShipments.CountryID...
  10. B

    Need help with SQL

    I'm having trouble retrieving records with one of my unbound text boxes. cboCountryId is one of the unbound combo boxes on the main form. The main form has a subform on it, which displays data based on criteria selected in the unbound combo boxes on the main form. All the unbound combo boxes...
  11. B

    Syntax Error in SQL statement

    Thank you for the code, Wayne. I did not design this database; I inherited it. Just fixing some bugs for the users. I would like to ask though: What is the best method of saving data to the table? 1. Using unbound text boxes on the form with a save button? 2. Basing the form on the table...
  12. B

    Syntax Error in SQL statement

    Thanks for your code Wayne! I did not design this database, I have inherited it. Just fixing some bugs in the database. I would like to ask the question though: Is it not better to just base the form on the table and not worry about saving data from unbound text boxes to the table? I have...
  13. B

    Syntax Error in SQL statement

    Thanks again everyone!! I will try Mile-O-Phile's code again, but without the additional "&". I will also experiment with a QueryDef. I should probably explain what I am doing: 1. I have a form that contains only unbound text boxes. 2. The user fills in the information and clicks on the...
  14. B

    Syntax Error in SQL statement

    Thanks everyone! I replaced my code with Mile-O-Phile's: strSQL = "UPDATE tblCustomer SET StartDate = #" & txtStartDate & "#, " _ & "EndDate = #" & txtEndDate & "#, " _ & "Name = """ & cboName & """" & _ & "WHERE CustomerId = " & txtCustomerId & ";" The above gave me error: "Compile Code...
  15. B

    Syntax Error in SQL statement

    I'm getting a syntax error in the following SQL statement. The whole statement is actually very long, so I am breaking it up. I am testing just part of it, but I get a syntax error message: strSQL = "UPDATE tblCustomer SET StartDate = #" & txtStartDate & "#," _ & "EndDate = #" &...
  16. B

    Visible Min and Max Buttons on Form

    Spacepro....you were right! I was confused, because when the form opens, and I look at the properties, the borderstyle is "sizable", but the command button used to open the form actually opens it acdialog. I change the code behind the command button and my buttons now appear! Thanks a bunch!!! :D
  17. B

    Can't turn off Access Warning Message

    I found some sample code and figured out how to re-write the DAO to ADO. It works, but I'll need more practice with this. I can't seem to find a consistent/standard way of writing it though! THANKS A BUNCH FOR YOUR HELP MILE-O-PHILE!!!!!! Here is my re-written code with ADO: Dim...
  18. B

    Can't turn off Access Warning Message

    Mile-O-Phile - The following code in the link you provided works great, but I'm having a hell of a time trying to convert the code to use ADO instead.....I've been trying to find examples, but can't get it going: What do I need to change to make it work with ADO? Dim db As DAO.Database Dim rs...
  19. B

    Can't turn off Access Warning Message

    Thanks Mile-O-Phile! I wasn't sure how to apply your suggestion to my code, so I looked it up in Help and re-wrote my code as follows, but now, when the user wants to add the item, I get the error: "Characters found after end of SQL Statement". Here is the new code: Dim ctl As Control...
  20. B

    Can't turn off Access Warning Message

    I want to suppress the Access Warning message when this code is run. No matter where I place my "docmd.setwarnings false", I still get the Access message. What am I doing wrong??? This code is within the "Not-In-List" Event of a combo box. Dim ans As String DoCmd.SetWarnings False...
Back
Top Bottom