Search results

  1. P

    DAO Recordset problem

    Hi, I have this really strange problem that has never happened before. I open the DAO recordset: Set rstCalls = CurrentDb.OpenRecordset("Select * From Calls Where SerialNumber = '500'") I know for sure that the recordset should return 6 records and it always returns just 1 If I change the...
  2. P

    Variable as a name of the recordset's field

    Hi, I have a function that accepts the field name as a parameter Sub MyFunction(ByVal strName) In the function I set the DAO recordset: Set rst = CurrentDb.OpenRecordset("MeterVolumes") Then I want to use the parameter strName as the field name of that recordset .AddNew rst!strName =...
  3. P

    Field's name property

    Hi, After I import the Excel spreadsheet into new Access table, keeping the excel columns as the Access fields name, I want to be able to find out the names of the fields. Say for instance, I know for sure that one field name will have the following name "Pages/MO Feb. 2003"...but I will also...
  4. P

    Export data to Excel

    Hi, I was wondering if anyone knows how to export different tables to one excel workbook, putting each table into separate sheet within the book. Thanks.
  5. P

    Edit excel workbook from Access

    Hi, I wonder if anyone could show me how to rename the several worksheets within one excel workbook that I access from within the Access module. What I do is I let user choose a excel file, then create Excel object Dim xls As Excel.Workbook Dim wks As Excel.Worksheet Set xls =...
  6. P

    Format spreadsheet from Access vba

    Hi, I want to do the following: Before I import the excel spreadsheet into Access table, I want to be able to access that spreadsheet and change the data type of some columns in it. Since I don't want my user do it manually, I am looking for the VBA code to solve this problem. Please advise...
  7. P

    DoCmd.OutputTo problem...

    Hi, I need to output the table (22000 records) to excel spreadsheet. When I use the following code DoCmd.OutputTo acOutputTable, "tblAutoPassExport", acFormatXLS I receive the error message saying that 'Too many records to output'. Is there a way around this limitation? I'll appreciate your...
  8. P

    Converting Access 97 to Access 2000

    Hi, I need to convert Access 97 database to Access 2000. I did not go through Convert option, but simply imported all the objects from 97 to new 2000 database. Once I have done that, I encounter lots problems that I didn't have in Access 97. For instance, some of my INSERT INTO queries run...
  9. P

    Delete tables from the code

    Hello, I was wondering if anyone could tell me how to delete the tables using VBA? The trick is I woulnd't know the exact names of the tables. I would want to delete all the tables that contain "Errors" in their names. Please advise. Thanks.
  10. P

    Need help with Excel import/export

    Hi, I believe many of Access developers have been involved into working with Excel files (import/export) via VBA. So, I was hoping someone could help me with topic. When I import the Excel file into Access table, I lose some data due to errors such data type conversion failure, etc. Is there...
  11. P

    Import excel sheets to table

    Hello, I want to import certain sheets from the excel spreadsheet into one access table. I know how to import one sheet: DoCmd.TransferSpreadsheet acImport, , "Table1", path, True, "Group_Billing!" But is there a way to import a few sheets? Thanks.
  12. P

    Convert Excel file into Text file

    Hello, I have this task. I need to convert the excel file into the text file before I import it into the the Access table. While I convert it into the text file I need to take into consideration the scientific numbers that spreadsheet contatin, so they would be converted properly. I do not...
  13. P

    How to write a function?

    Hi, I have a very generic question Can anyone give me an example of the VBA function and funciton call I need to pass parameter to function ByRef and then return three parameters back to the place where the function was called from Thanks.
  14. P

    recordset question

    Hi, Is there such thing in VBA as cursor I mean could I say select records into the recordset and then treat recordset as it were a table Example: sql= Select * from Table1 where Name="sabavno" Set rst1 = CurrentDb.OpenRecordset(sql,dbOpenDynaset) I will get a recordset, that supposenly...
  15. P

    Subquery challenge

    Hi, I have been struggling with this long enough. Here is what I need to do using ONE query 1) SELECT DISTINCT IIF([F1]=1,"Y","X") as NAME, Transit from Table1 where Transit=7753 the above depending on the transit number as a criteria will return either one or two records NAME: TRANSIT: Y...
  16. P

    Subquery help needed

    Hi, I was wondering if I could do something like follwing and what is the right syntax for that Select COUNT ( select fld1, fld2, fld3, fld4, fld5 from query1) I know I could create another query and say SELECT COUNT(*) from query1 But I need to count it in one query Thanks.
  17. P

    Count records in the recordset?

    hi, how to count the number of records returned in the recordset? thanks
  18. P

    need help with subquery

    Hi, I have this subquery that does not work If anyone could take a look at that, I'd appreciate it SELECT NewQuery.Name1, NewQuery.TRANSIT, NewQuery.OP_STATUS, NewQuery.GL_INPUT_TYP FROM NewQuery where NewQuery.Name1= IIf([Count([NewQuery.Name1])=2,[Name1]<>"RBFG",[Name1]) Thanks
  19. P

    Need help with subquery

    Hi, Please help me to construct the subquery. I have a query that returns either one or two records. If query returns two records, one record will always have value "RB", and the second could have anything. Select NAME from transits where transit=5 NAME: RB ST I need to create a subquery...
  20. P

    String modification problem

    Hi, I have this problem. My list has a query as its source code. (For example: Select * from charges where AssetType = "Monitor";) You've noticed that there is a semi-colon that gets assigned at the end by Access 97 (there is not semi-colon at the end of the query's SQL in Access 2000) I...
Top Bottom