Search results

  1. J

    Odd multi-form with cascading combo box requery problem

    Attach your database in a zip file and I'll have a look. I may be able to come up with something by actually doing it rather than thinking about it. Cheers, JC
  2. J

    Calculate Value based on three variables

    The easiest way I have found to reference multiple columns in Excel is to treat it like an Access Primary Key (where the Primary Key is joined over several fields). By this I mean: Create a new column BEFORE the existing columns on BOTH files. Take your defined lookup variables (File A: Month...
  3. J

    Odd multi-form with cascading combo box requery problem

    Haven't had much chance to digest everything you've written here but from experience on something similar, I had to move the code from the AfterUpdate event to the Form_Current event. If that fails, perhaps check the RowSource property on the second combo box. It may have changed to reflect...
  4. J

    Need to perform a "lookup and classify" type query

    There are various conversion methods you can use to convert strings. Example: intNumber = CInt ( strValue ) where strValue = "123" returns 123 strValue = CStr ( intNumber ) where intNumber = 123 returns "123" CSng converts to a Single data type CDbl converts to a Double...
  5. J

    Problem witn the code

    Hi, Had a look at your project and changed a couple of things. First, changed the control name of the list box on the form frmAttendance to lstStudents. Second, changed part of the code in the function AddNewAttendancerecord to: For Each i In ctlRef.ItemsSelected rst.AddNew...
  6. J

    extract certain data

    Again, sorry about the delay. Busy work and social calendar this month. I'm not sure how you go about attaching the database, but if you do, I'll have a look at it. No promises that I'll be able to do anything but it's worth a go..... JC
  7. J

    extract certain data

    Hi, Sorry for the delayed response, was abroad on holiday. You can simply put this into a query. (Remember to change the table name to the name that you are using!) As you are new to Access, I hope this part isn't condescending but will explain how to create this query. Assuming Access is...
  8. J

    Running a query in VBA

    Is you FuelData field datatype set to DATE/TIME? If so, the Date/Time must be defined within hash marks, ie #15/8/2006#. Therefore, SELECT Max(Mileage) AS mMile FROM tblfuel WHERE (((FuelDate)<Forms!frmFuel!FuelDate) And ((UserNameID)=getuserid()) And ((VehicleID)=getvehicleid())); would...
  9. J

    How do I query a recordset object in VBA?

    Thanks for the length reply The_Doc_Man. I figured the problem was to do with the 'phantom' non-existent JC table but couldn't work out why. Your explanation is spot on and I now fully understand why I can't get it to do what I was hoping to do. Using a pre-stored query might assist, I'll...
  10. J

    extract certain data

    Try this SQL statement in your query, where Table1 is the name of the table containing your sales data: SELECT DISTINCTROW Table1.Year, Sum(Table1.Sales) AS [Sum Of Sales] FROM Table1 GROUP BY Table1.Year; Hope this is the answer you are looking for. JC
  11. J

    How do I query a recordset object in VBA?

    Thanks for the reply Banana. I have a version which creates a temporary table (as you suggested), then removes it when complete. The tables currently have very little information in them (less than 20 records) and it takes a couple of seconds to process as INSERT INTO queries. I'm kind of...
  12. J

    converting hyperlinks to text and cleanup

    Hi Mr. K, Create a New Query, select Design Query. From the Tables dialogue box, select the table with your email_address field in it. (I have called it Table1 for this example) Right click the title bar, and select Query Type -> Update Query. Again, right click the title bar of the query...
  13. J

    How do I query a recordset object in VBA?

    Hi all, I've been banging my head against this problem for a while now and making no progress and am hoping someone cleverer than me can provide some assistance in solving it, or point me in the right direction. Here goes.... I am working solely in the VBA environment and would like to...
Top Bottom