Search results

  1. C

    VBA to set a filter AND go to a specific record (without filtering further)

    I am trying to code a button that switches between two nearly identical forms for a touchscreen interface. The content is identical, but one layout (form) is for left-handed folks and the other is for right-handed folks. I'm trying to make it so that clicking the button toggles from one form...
  2. C

    VBA script runs slow the first time, then fast after that. Why?

    Belated reply. NOT compacting before I send out did the trick. I was always compacting to "tidy it up" before distributing, but that is actually what slowed it down. Now I compact, run the update queries, and distribute and it works much better. Also, thank you to Static for the hints on...
  3. C

    Importing non-normalized data into normalized tables

    My final solution was to just do this in R on the way to Access. In R, it's a breeze to flatten data. I just trigger an R script that takes a .csv, flattens it, exports as a new .csv. (3 lines of code). In Access I just trigger that script and then import the new .csv. So much easier than...
  4. C

    VBA script runs slow the first time, then fast after that. Why?

    Many thanks for helping take a look at this. I'm deleting/inserting about 2000 records (1500 in one table, 500 in another). Basically, this is generating prep instructions/recipes for specialized clinical diets based on a gazillion conditions for folks working in multiple locations. The...
  5. C

    VBA script runs slow the first time, then fast after that. Why?

    I have a VBA script that (a) deletes the contents of 2 tables and (b) runs 4 VBA-encoded queries that insert records into the same tables (i.e. refreshes the contents of those two tables). The first time I run the script after opening the database, it takes about 2 minutes to run. If I run the...
  6. C

    SetFilter only works for one conditional, not two

    The functional solution was indeed parentheses, but somehow not what you suggested. ((BOOL_A) AND (BOOL_B) AND (BOOL_C)) did not work. However ((BOOL_A) AND (BOOL_B)) AND (BOOL_C) did. Scratching my head over this one still. At any rate, it works! Logically, these are the same, no? And, in...
  7. C

    SetFilter only works for one conditional, not two

    I basically want a simple form that I can filter by three variables (SUPPLIER, FOOD, ANALYSIS). There are three comboboxes that let you pick from our short lists of suppliers, foods, and analyses, and a subform based on a query of those tables. This is a webform where I can't refer to the...
  8. C

    Dlookup vs. subquery

    And that worked! Thank you!
  9. C

    Dlookup vs. subquery

    I can include ItemID in the dlookup, but how can I specify that it should be the itemID of THIS line of the query? The code below still picks "10" as the multiplier for all the lines. SELECT tblMeasurements.ItemID, tblMeasurements.MeasurementID, tblMeasurements.MeasValue...
  10. C

    Dlookup vs. subquery

    I am querying a table (tblMeasurements) with the following format: ItemID MeasurementID MeasValue 1 23 10 1 24 1.5 1 25 2.3 2 23 20 2 24...
  11. C

    Formatting option-group buttons to be flat

    Yes, but as soon as I change any formatting (color, border, etc.) it changes it back to yes :(
  12. C

    Formatting option-group buttons to be flat

    I have an option group of buttons and I can't seem to get their appearance to be "flat". No matter what settings I choose in Properties, they retain their "raised" appearance. This does not hold true for regular buttons (not part of an option group). Does anyone have any suggestions for how...
  13. C

    Unshown fields are affecting sum in query

    Thanks! When you use the query designer, it isn't obvious that you have to add a column to force it create a WHERE vs. a HAVING statement. This page helped explain the difference to me, since it isn't always obvious. Also, I'm so used to it giving me an error about the "specified expression...
  14. C

    Unshown fields are affecting sum in query

    I'm having trouble with a query criteria causing SUM fields to not add up as I wish. Basically, I need to run criteria on a field, but I don't show that field in the resulting data table. I want it to ignore that field (NOTES) when summing the prices. Test Table: NAME CATEGORY PRICE...
  15. C

    Ideas for ways to automate importing external data

    I ended up with a form laid out sequentially into the following steps: The first item is a combo box that lets you choose the lab format (so far, I've only got this set up for one lab). This is next to a button that launches the corresponding script in R. The R script prompts the user for an...
  16. C

    Ideas for ways to automate importing external data

    Hey! I think I've got something going here that is a little faster: 1) Flatten data in R, import to Access (hoping to eventually automate this, but so far, manually) - looks like flattened file above 2) SQL query adds two columns to the imported table: LinkedNutrient and LinkedFood 3) A form...
  17. C

    Ideas for ways to automate importing external data

    Thanks everyone for the speedy and detailed advice! The_Doc_Man - thank you very much for such a detailed procedure. I think that is a direction I will head, with some modifications that have struck me in the meantime. Here is my current thoughts to changing the procedure using your...
  18. C

    Ideas for ways to automate importing external data

    Thanks - but this still involves me manually coding all the original data files in Excel. I guess I was hoping I could use Access to recode the data somehow. Right now the first two steps on my process can take over an hour per report (there are hundreds of items on these reports), and I get...
  19. C

    Ideas for ways to automate importing external data

    I have a database containing nutrient information for a variety of foods. We regularly get nutrient reports from various analytical laboratories. The reports are in excel, and they name both the foods and nutrients with a variety of non-standardized names. The data tends to come to us in...
  20. C

    Importing non-normalized data into normalized tables

    I would like to import (using an append query) data in the following format: Sample Name Carbon Nitrogen Oxygen Hydrogen Sample 123 10 20 30 40 Sample 234 15 54 25 60 to a table in my database with the following columns: RecordID (autonumber primary key) SampleID (foreign key to table...
Back
Top Bottom