Search results

  1. M

    end select without select case error

    Hi all, I'm getting a strange ocurrence of the error in the title when I add a couple of lopps within a select case statement. The full code is below (including the (currently commented out) for each next code that throws the private sub in to an error). Private Sub btnSaveClose_Click()...
  2. M

    VBA Insert into combo box and requery issue

    Hi all, I was trying not to have to ask on here and find out the solution myself but it's now got to the point of needing help! I have a form for components (frmComponents) (each component has its own record). The form has a subform (fsubComponentHistory) to keep track of each component's...
  3. M

    Need help looping a macro

    Dear all, I'm not used to programming in excel, but I have an issue where I need to transform data from one sheet (sheet 2) in to a different order on a different sheet (sheet 4) to enable me to enter data in to a database which is a specific format. The data is in specific cells so it's not a...
  4. M

    Pasting CSV Data into a text box and copying it to a series of text boxes

    Hi all, I have a form on which there is a series of text box controls relating to different frequencies. At the moment I enter a value in to each of these manually. However, I would like to have an unbound text box where I can paste in all the values (6 or 8 of them) from excel and then press...
  5. M

    too few paramaters, expected 1 - dao recordset

    Hi all, I am trying to open a record set based on a query and then with the results of the query, post 2 values in to 2 variables for use later on in a module. My code so far is: Dim strBanksianWinner1 As String Dim strBanksianWinner2 As String...
  6. M

    Unbound Combo Box on report

    Hi all, I have an unbound combo box on a report that looks up to a table of address data. I have a specific requirement where if one of the bound fields on the report is a specific value, I want the combo box to show data. If the bound control on the report is a different value, I want the...
  7. M

    Changing Stock levels of multiple product components by one command

    Hi all, I have the following form and subform combination: The subform is linked to the main form by way of the "ProductID" control. (It's hidden in the subform). Basically, each product (the finished article) is made up of many components. What I would like to do is this: 1. Increase...
  8. M

    Insert query syntax error

    Hi All, I'm trying to do an insert into query via VBA that takes the values of some controls in a form and puts them in to another table. Basically frmPurchaseHistory, if a new record, will insert a new entry in to tblComponentHistory. My Code is as follows but it is getting a syntax error...
  9. M

    Update query in VBA

    Hi there, It's been a while. I've never used an Update query before, but I have a perfect requirement for one now. I have a form (frmOrders) with a subform (frmProduct_OrderAmount) in it. Linked by the Order number. When I do a new order, I enter the products for that order by use of the...
  10. M

    Which loop to use?

    SOLVED: Which loop to use? Hi there, I'm trying to work out which loop I need to use or if I need to use a mix of loops. The context is as follows: I have a table of absorption values for each material. I have a button which calculates which class of absorber the material is, based on its 5...
  11. M

    Reading Access Database in Excel

    Hi all, I want to link my access database to a new Excel spreadsheet so that the data is stored in Access but Excel can then read information from a table or query and then calculations can be done based on its values. At the moment, I've got it working but some of the fields have multiple...
  12. M

    query to show entries between 2 points

    Hi all, I'm struggling with a query syntax. I'm trying to use a where clause to make only records in the last two years show up: This is invoked via VBA. My SQL is as follows: SELECT tblShowAwardEntrant.lngzShowID, tblShowAwardEntrant.lngzAwardID, tblShowAwardEntrant.lngzEntrantID...
  13. M

    Recordsets and pulling values from them

    Hi all, I have some code where I run a query and then want to pull values out of it and store them in two variables: Case Is = "Banksian Medal" 'Most points in horticultuaral classes. Can only be won by same person every 3 years. Dim strBanksianWinner1 As String Dim...
  14. M

    WhereCondition linking to criteria

    Hi all, I'm trying to use VBA to open a form with link criteria to column(5) in a form control but I get invalid function. (referring to "lngzEntrantID.Column" in the link criteria) Basically, I need to make sure that it doesn't equal either value in 2 variables I have filled up. My code is...
  15. M

    Award Results with variables involved - not really sure how to title this.

    Hi all, I have an issue where I'm calculating awards for people, but one of them is worked out by the person with the most points in certain categories, but if they won in the previous 2 years, then it goes to the person with the next highest points etc. Now, each PERSON has their own unique...
  16. M

    Error 3122 - Tried to execute a query that does not include the specified expression

    Hi all, "you tried to execute a query that does not include the specified expression 'lngzShowID' as part of an aggregate function" I'm trying to do a totals / summation in SQL but I am getting the above error. My code is: Dim strRHSBMSelect As String Dim...
  17. M

    Filtering a Combo box based on contents of another FORM

    Hi all, I have an issue (Probably created to my bad database infracstructure) but it's only a luxury thing I'd like to do anyway... This is something that is similar to the filter one combo box based on another one, but with a difference. (I think). I have a Form with the following controls...
  18. M

    Check to see if a record exists then do something

    Hi all, I need to sort out some coding to see if a record exists based on 2 fields... lngzShowID and lnzgClassID in one form, being equal to that of the form which is issuing the command. If it doesn't, then I will open a form with the command to add, but otherwise nothing will happen. I...
  19. M

    Flower Show results tally

    Hi all, I am making a database for a local flower show (run by my Father in Law). I have made quite a lot of progress and a lot of the functionality. However I am now at the point where I need to transform the results of 1 - 4th place into scores and tallying them up. Basically, 1st place = 5...
  20. M

    Using Columns in where clause

    I have a query which is simply 1 field, but that field contains 6 columns (obviously numbered 0 - 5). Now I want to use a where clause so that the 4th column (or rather, column 3) is equal to a particular criteria. What is the syntax for this? The SQL code from the standard query with NO...
Top Bottom