Search results

  1. eTom

    Adding data to Excel file

    Hi all I am having trouble getting my function to add data to an Excel worksheet before saving it to the desktop. It opens the template and saves the file just fine, but for some reason I can't get it to add anything to the sheet! I've tried writing it from scratch and copy/pasting it from a...
  2. eTom

    Importing from Excel with lookup values?

    Hmmm... I think that is a little above my understanding and I wasn't sure how to automate it. The people using the database need it as easy and one-click as possible. I ended up creating a VBA script that opens a spreadsheet and imports it row-by-row into the table, assuming it doesn't detect...
  3. eTom

    Importing from Excel with lookup values?

    I'm not sure if this is the right section or if the subject is worded correctly, but I am building a small database to automate the process of producing sales reports for our sales staff using data from our customers (distributors). They provide us with Excel spreadsheets with detailed sales...
  4. eTom

    External Data

    I'm not entirely sure. I based it on a query I'd built in VBS (that gets built based on some selected values). I'm not very proficient with SQL or Access yet, so what I did was copy/pasted the SQL code to a new query and then used the "design" Mode to add in a few fields from other tables...
  5. eTom

    External Data

    I am trying to export data from Access to Excel, so I can use it to populate a spreadsheet that we use as an in-house form so I can save myself the step of manually entering data. In Excel 2007, I can connect to my database using "Get External Data" but it only lists tables and *some* of my...
  6. eTom

    Data From a Table

    Absolutely brilliant, thanks! I'm using an OnChange because it seemed like the best choice. I tend to pick the wrong product, or type it in to avoid using the mouse. OnChange will update the fields every time it's changed to a different product, right?
  7. eTom

    Data From a Table

    Here's what I'm sure is a stupid question: I can't seem to pull data from a table for a form. I have a combobox that when a user selects an item, I want it to populate three or four text boxes based on data from a table that the user selects. They select an item called "Product123" from the...
  8. eTom

    Scatter Chart

    I'm having a heap of trouble getting a scatter chart working. My report lists records from a query, including AvgDiameter, MinDiameter and MaxDiameter. The chart is supposed to have all three of these as their own series of points. My problem lies in the X Axis. Ideally I want them simply...
  9. eTom

    Calling "Me" in a SQL expression.

    It's strange, but I'll get there one day. The big drawback for me is that this is only a really small portion of my job. Originally I just had to find a way to start pulling data from these incidents without actually sitting and going through each one by hand. When they were handed over to...
  10. eTom

    Calling "Me" in a SQL expression.

    See? It's those kinds of concepts that will take me some time. Any coding I've ever done has ingrained a hierarchy and order of operations that is going to be tough to let go!
  11. eTom

    Calling "Me" in a SQL expression.

    Yes, it does seem like that sometimes, though I'm slowly getting little concepts here and there. We must have been posting at almost the same time there, my email went off just after I hit Submit Reply!
  12. eTom

    Calling "Me" in a SQL expression.

    Here is what I've done so far: Me.RecordSource = "SELECT I.* FROM (tblIncidents I " & _ "INNER JOIN tblIncidentDetails D ON I.[IncidentReportID] = D.[IncidentReportID]) " & _ "INNER JOIN tblProducts P ON D.ItemNumberID = P.ItemNumberID " & _ "WHERE D.ItemNumberID =...
  13. eTom

    Calling "Me" in a SQL expression.

    I must say I like the idea of aliases and using " & _ to continue the code on the next line. That is definitely going to clean things up! I get a syntax error in FROM clause, however. I tried removing the aliases, putting it all back into one line, and doing both, but to no avail. Is it a...
  14. eTom

    Calling "Me" in a SQL expression.

    I didn't know you could do that! That's great! The problem I have with that is that my SQL statement is set by a VBA Else If statement, so I'm unsure how to add the required tables manually. Me.RecordSource = "SELECT tblIncidents.* FROM tblIncidents INNER JOIN tblIncidentDetails ON...
  15. eTom

    Calling "Me" in a SQL expression.

    Yet another seemingly simple question, I think. With the sub form, it lists all the products associated with the given event. I want to add a text box that has the values of a few fields. ie: It's currently broken down to BrandID, ProductID, etc. I want to list in the text box BrandName &...
  16. eTom

    Calling "Me" in a SQL expression.

    Oof. Now I feel stupid. I had assumed typos and had even re-typed it. I wonder how I spelled it incorrectly the first time!
  17. eTom

    Calling "Me" in a SQL expression.

    Here's another one that has me stymied: ElseIf Forms!SearchParameters.SearchBy.Value = 4 Then Me.RecordSource = " SELECT tblIncidents.* FROM tblIncidents INNER JOIN tblIncidentDetails ON tblIncidents.[IncidentReportID] = tblIncidentDetails.[IncidentReportID] WHERE...
  18. eTom

    Calling "Me" in a SQL expression.

    I started looking through the help files and found INNER JOIN. I was having trouble with the Syntax, so I created a query using the Query Wizard that essentially just added all fields from both tables. I then looked at the SQL view and took this from it: INNER JOIN tblIncidentDetails ON...
  19. eTom

    Calling "Me" in a SQL expression.

    It's actually starting to come together. I had some issues with typos here and there, which I fixed by taking the SQL statement out of the VBA and just putting it straight into the form to see if it worked. I tweaked it til it was correct and then put it back into the IF statement and tweaked...
  20. eTom

    Calling "Me" in a SQL expression.

    Mostly can't wrap my head around the methods. I have some past experience with C++, JavaScript and HyperTalk (way back in the day) so I'm far more comfortable with something a little more familiar. In terms of IF statements and that sort of logic, building a VBA one like this seems far simpler...
Back
Top Bottom