Search results

  1. F

    Query with identifiers formed from columns

    I have a table with a string field, call it String1 and a date field, call it Date1. I want my SQL query to return all unique instances of String1&Date1. I think i might have this with: SELECT DISTINCT [String1] & [Date1] AS Expr1 FROM [Project Table 1]; However also in the table is...
  2. F

    VBE Runtime Error - Invalid SQL statement

    Yes a query would do this operation easily. But eventually i want to do more complex calcs and logic that i don't think a query could handle. For example next task is to work out the number of working days between two dates. As far as I know networkdays is not available so i will have to use...
  3. F

    VBE Runtime Error - Invalid SQL statement

    My table is not dynamic in that sense. So the user enters the data, runs the calcs, gets an output, the end. I managed to get somewhere with a bit of trial and error. Feel free to pick this code apart and tell me of any poor practises: Private Sub PrepMktDataBtn_Click() Dim cn As...
  4. F

    VBE Runtime Error - Invalid SQL statement

    I am storing the result of a calculation. Is it so strange to want to perform some calculations on data stored in an access table and output the results to that table.
  5. F

    VBE Runtime Error - Invalid SQL statement

    PID:6 happens to be the name of my table. So forget the book and the code here. I have a table sitting in an mdb file. I want to loop through each record, perform some calculations based on the contents, and enter the result into other records in the same table. 1) Should the code that...
  6. F

    VBE Runtime Error - Invalid SQL statement

    Hi, I have created a database with a table. I am trying to access some records using the VBE and print them to the immediate window. Trying to do it properly so followed this code from a book. But it just gives me a runtime error. Any ideas? Private Sub Command0_Click() Dim rst1 As...
  7. F

    Getting started, accessing records etc

    Thanks for your quick reply. I think i am using a bound form. But I need to access more than one table. And i dont want to change records manually, i need to code to do it. Once i get up and running the code will access thousands of records, run calculations, reference other tables, and...
  8. F

    Getting started, accessing records etc

    Hi, I have built some tables in Access, and i have set up a form. I have even set the record source of the form properties to my main table. I want to use VBA to: a) view/access the content of an existing record b) edit the content of a record Having spent half a day looking at info on...
Back
Top Bottom