Search results

  1. R

    Query that rolls up to next highest value

    I came up with a semi solution, can you guys let me know what you think? In one standard I do increments by 10 and the other I can do increments by 100 which will be a little faster. Do you think this method is too slow? The code below is for AS standard and I have to do increments of 10 because...
  2. R

    Query that rolls up to next highest value

    Hey guys, I will be coding something over the next few days and I'm not so sure how to go about doing it. The user can select a number from a drop down and the tension will be calculated in another box. But, if the user inputs the tension, then the program needs to pick the appropriate value...
  3. R

    Always display one decimal place

    I've changed to: 'Query tblCordInfo to return all available cord diameters matching the selected manufacturer strCordDiameterSQL = "SELECT DISTINCT FORMAT(tblCordInfo.CordDiameter, '#0.0') FROM tblCordInfo " strCordDiameterSQL = strCordDiameterSQL & "WHERE tblCordInfo.CordManufacturer = '" &...
  4. R

    Always display one decimal place

    Maybe I need to play around with the SQL code: 'Query tblCordInfo to return all available cord diameters matching the selected manufacturer strCordDiameterSQL = "SELECT DISTINCT tblCordInfo.CordDiameter FROM tblCordInfo " strCordDiameterSQL = strCordDiameterSQL & "WHERE...
  5. R

    Always display one decimal place

    I've change the format of the list box control to 0.0;0.0;0.0 and when you select "5" from the list "5.0" is placed in the list box. But I want it to say "5.0" when it is in the list as well.
  6. R

    Always display one decimal place

    This should be an easy fix but I cannot solve this: I want to have all values in a list box show 1 decimal place. I can get it to look like this: 4.90, 5.00, 5.10 and like this 4.9, 5, 5.1, but I need it to look like this 4.9, 5.0, 5.1. My table has the following properties: Field Size -...
  7. R

    Anything wrong with this VB query code?

    Wow problem solved In my other function I was saving the value of the textbox into a variable before executing the query. So when I do Dim freeCordManufacturer As String freeCordManufacturer = Me.txtCordManufacturer1.Value CurrentDb.Execute "Insert INTO tblFreeDesignForm...
  8. R

    Anything wrong with this VB query code?

    Update: I put the SQL into a string and executed the string. I thought it may have been because I was not assigning my table a primary key but that is not it. Stepping through my code I found this. tblFreeDesignForm = Empty and FreeCordManufacturer = Empty even after I execute my Insert...
  9. R

    Anything wrong with this VB query code?

    Hey guys, I've been using this same code all throughout my project but it is not working right now and I'm not getting any errors. Do you see anything wrong with it? CurrentDb.Execute "Insert INTO tblFreeDesignForm " & _ "(FreeCordManufacturer, CordDiameter) VALUES " _ & " ('" &...
  10. R

    How to check if an option button is selected.

    I have 2 option buttons what do I have to do to get different code to run based on which option button I select. Right now I have if option1.checked = True then ..... elseif option2.checked = True then ...... endif Checked isn't working and neither did value or enabled so what do I need...
  11. R

    Changing Combo Box Values Based on Previous Input

    I can do SQL code for combo boxes but it doesn't work for text boxes. I am trying to activate the control source during an AfterUpdate event. Dim sqlSTR As String sqlSTR = "SELECT table.returnValueFROM table " sqlSTR = sqlSTR & " WHERE table.lookupValue = cboLookUpValue;"...
  12. R

    Changing Combo Box Values Based on Previous Input

    Excellent it was just what I needed. Just out of curiosity if my final resulting combo box only has one value in it I want it to automatically be selected. I could just make it a text box but I think there may be a few cases where multiple values could get generated. How would I go about doing...
  13. R

    Changing Combo Box Values Based on Previous Input

    Hey guys, I have a series of 3 combo boxes and I want the lists to generate based on previous input. The best example of this I can think of is with sports teams. Let's say I have 3 lists 1. League 2. Division 3. Team For baseball there are 30 teams. So without picking a league or division...
  14. R

    Maximum value in a row

    Well, the don't have to be in the same table, remember these are the results of a calculated query. I could just as easily make them two separate queries, but I still wouldn't know how to find which one is greater using SQL. I'll try out the if logic.
  15. R

    Maximum value in a row

    Hey guys, I have a query where I do a bunch of calculated values. For my next query I need to determine the higher of the two values in a row and then perform calculations on them. I know how to do this in VB but I'm trying to let the SQL handle all of my calculations. So. in my query called...
  16. R

    Putting form data into a temporary table

    Alright, this problem seems to have manifested itself again. Once again, I have an input form with about 8 text boxes. I want the values of all of those text boxes stored into a temporary table. Right now here is my code for when the form loads: CurrentDb.Execute "Delete * FROM tblInputForm"...
  17. R

    Putting form data into a temporary table

    Finally got it working!!! I had to do the " & variableName & ' trick but now it's working. I did have to use variables, but when this becomes a web project the VB code should convert nicely into PHP and my SQL statements will already be generated from Access. Thanks everyone especially you...
  18. R

    Putting form data into a temporary table

    Alright I've got my queries automated now and they are returning the proper values. But, my input form still isn't working. I only want my input form to have 1 record at any given time. So on load I have this piece of code: Private Sub Form_Load() CurrentDb.Execute "Delete * FROM tblInputForm"...
  19. R

    Putting form data into a temporary table

    http://userpages.umbc.edu/~cibor1/MyDatabase.mdb That is how you can access my database. The two main problems I am having right now are when I load the form I get "#DELETED" in all of my text boxes. I've tried Inserting a dummy row after the delete command and inputting a dummy Primary Key...
  20. R

    Putting form data into a temporary table

    Well I would be using variables, but in the future this will be a web application and I will want to use tables as much as possible. I have my form linked to my tblInputForm right now sometimes I get #DELETED in my text boxes. What do I do to get rid of this problem?
Back
Top Bottom