Search results

  1. R

    Getting input box to feed query before function call

    Hello, So in my last post I got the answer to calling a function that will export a record set to Excel. but the issue with that, is my where has a WHERE clause that requires the user to input a Date Range. I am trying to get the VBA to get the data from the user then open the query and...
  2. R

    Open Excel temp from a Query

    Hi all, Bit of an odd one, but can you Export a Query to Excel as a temp file. By that i mean, not writing an Excel file to a save location, but more Opening excel, putting the data in and then the user has to save the document? The reason being, I dont know or have access to any of the...
  3. R

    Cant seem to get DoCmd.ApplyFilter to work

    Hi all, This is my code: Private Sub Command10_Click() Dim Path As String Dim Af As String Dim AL As String Dim DT As String Path = "C:\" Af = Affiliatebx 'A box on the form that give the client name XL = ".xls" DT = Format(Now, "DDMMYYYY") DoCmd.Close 'this is here as the Readonly...
  4. R

    Referencing Column names

    Hi Guys, I have a table that feeds a form, the table is a list of things that could be required for input in to a system based on client request. Lets call it "Detail" Client ID | Client Name | Profile | Image attached | and so on. The data in these columns, is not really for anything other...
  5. R

    Best way to open a second form

    Hi, I have a first form, "Customer Details" This links to 2 tables, Customer Info and Contacts. on this form is a button that opens a second form Technical Information The table for this form has the ID of the Customer details form in colum CUST_ID. I thought i would do a VBA button...
  6. R

    Delete Rows from Excel 'sometimes' works?

    Hi all, I have a function that works sometimes, but other times gives me an error. "Run-time error '1004 Method 'Rows' of object'_Global' Failed" My function, opens Excel and then erases all the rows that meet a string value in a cell. when is does work, it has this habit of making a hand...
  7. R

    Assigning Alias to First record of an ID

    Hi all, I have some data where there is a Product_ID, linked to this is the first appearance of this ID, Ship_Date. Furthermore, i have ordered the list by Ship_Date and autoNumbered the rows 1 > etc.. I need a way of finding the first appearance of that Product_ID and giving it an alias...
  8. R

    Simple = (IIF) statement returns error?

    I have 2 queries, on each one sits a string column called Package_ID. I have created a LEFT JOIN between the 2, (all Items on Q1 and only matched Items on Q2) My Statement is IFF([Q1].[PackageID] = [Q2].[PackageID], "Match", "NO Match") I expect where the IDs match to return MATCH (This...
  9. R

    Record Indexing/Duplicate naming

    Hi, I have data that looks something like below, ID | DATE | INFO 111 1/05/2016 Prog A 111 3/05/2016 Prog A 111 2/05/2016 Prog A 222 1/05/2016 Prog B 222 6/05/2016 Prog B 333 2/05/2016 Prog C The ID is NOT Unique, it's a TV Programme ID What...
  10. R

    Invalid Use of Null

    Hi, so i have built a query that takes a date cell and a time cell and puts them into a new cell as "dd/mm/yyyy hh:mm:ss" Publish_DT: [Schedule Date] & " " & Format((TimeValue([Schedule Time])+TimeValue([Duration]))-(TimeSerial(0,15,0)),"Long Time") Then i have another query that takes a...
  11. R

    Query based on 2+ conditions between 2 tables

    Hi Guys, How would i go about the following Statement as a Query. IF tbl1.ID = tbl2.ID AND tbl.1.Customer=tbl2.Customer THEN "y" ELSE "NO" END I tried the following in Expression Builder iff(tbl1.ID=tbl2.ID,"y","n") just to see if it would flag the rows from table 1 as being present in...
  12. R

    CASE/SWITCH SQL in VBA

    Hi , In MYSQL, i can use the CASE statement to take 1 column from a table and generate 2 new columns with new data based on that info. Eg. TBL1.Bike BIKE Yammaha R1 Kawasaki H2 Suzuki GSX Honda FireBlade I can then CASE this info, with something like Select Name , CASE BIKE...
  13. R

    Importing Multiple Excel Files to a single Table in Access

    Hi all, I know this subject has been covered and i have been reading a lot of those posts, but i cant find/get to work exactly what i am looking for. I have a folder location that will get 6 new Excel files added to it each day, with names that mean nothing most of the time. But the...
Top Bottom