Search results

  1. D

    Why DoCmd.TransferDatabase not work in a for loop

    Thanks all you guys who reading my post. The For loop works now. I don't know why it fail last time (definitely not using the wrong "Loop", Otherwise I should got syntax error instead of error 3011) Actually, I'm testing different method to link the backend table. So far, below methods works...
  2. D

    Why DoCmd.TransferDatabase not work in a for loop

    Hello Ranman256 Now I move those tables name to a new created table. And loop through them by RecordSet. But it still show the error 3011. I haven't try the collection method yet. But if I have thousands of tables need to link. Then I need to convert them all to collection. This doesn't make sense.
  3. D

    How to link to the tables in backend from frontend

    Finally I find the right step at here https://www.microsoftaccessexpert.com/Microsoft-Access-Code-LinkTable.aspx
  4. D

    Anyway to prohibit link to non trusted location

    hello gemma-the-husky, My purpose is to restrict what file user can open. The design is to let user to use the frontend accde to choose a backend accdb to open. Then link its tables. A central storage will be use to store the valid backend accdb files. All the other accdb (even valid), if not...
  5. D

    Why DoCmd.TransferDatabase not work in a for loop

    Below code works DoCmd.TransferDatabase acLink, "Microsoft Access", "path_to_accdb", acTable, "table1", "table1" In a for loop not work, show error 3011 "The Microsoft Access database engine could not find the object 'table1'. tables = Array("table1", "table2", "table3") For Each element In...
  6. D

    Anyway to prohibit link to non trusted location

    I've add the path in Trust Center - Trust Locations. Now, every time I link to those tables in the accdb file which inside the trusted location, there's no more warning show again. But, those not inside trusted location is still prompting the warning message. With a "Open" button that allow...
  7. D

    How to link to the tables in backend from frontend

    I've found some code on the web, like below Dim dbs As DAO.Database Dim tdf As DAO.TableDef Dim strConnect As String Set dbs = CurrentDb Set tdf = dbs.TableDefs("target_table") tdf.Connect = ";DATABASE=" & thePathToTheAccdb tdf.RefreshLink But I always got the error "Item not found in this...
  8. D

    data showing in report view not in print preview

    Same problem here. Using Access 2013 64bit. Report View has no problem. After click Print Preview, all the field value gone. Then click Close Print Preview, all the field value gone even in Report View.
  9. D

    Error "Too few parameters Expected 1" when insert Excel cell value

    JHB. Thanks a lot. This's really a silly mistake :banghead:
  10. D

    Error "Too few parameters Expected 1" when insert Excel cell value

    I've attach the Excal and Access files. Just place the Excel file at "C:\", then click the button in the Access form. It suppose to run the SQL which copy the cell value from Excel file to the created Access table. It works if the cell value are number. But will show "Too few parameters Expected...
  11. D

    Place a concatenate string for the Name parameter in OpenRecordSet

    Thanks arnelgp. This is my 1st time to use TempVars()
  12. D

    Place a concatenate string for the Name parameter in OpenRecordSet

    I know the Title is difficult to understand. Please see the example code below I want to run a serial of SQL in a for loop. Dim rst As Recordset Dim qryStr1, qryStr2, qryStr3 As String Dim i As Integer qryStr1 = "SELECT * FROM tableA WHERE blah blah blah" qryStr2 = "SELECT * FROM tableB WHERE...
  13. D

    Query result can show in list box, but not combo box

    I've a form that let user to input an ID, then click a button to show the result in a report's combo box. The reason I use combo box but not list box is because I need to limit the number of result show in the report. So I need "ListRows" which only can use with combo box. Private Sub...
  14. D

    How to dynamically add a control button to a form

    Thanks a lot JHB, I never use .Properties.Item("OnClick") = "[Event Procedure]" before. Thanks for teaching me. Since delete the form is not possible. I change the design of this part in my Access database. The target of this form is to show the duplicate record(s) in the list after compare 2...
  15. D

    How to dynamically add a control button to a form

    I want to achieve the below tasks: 1. Create a form by VBA code 2. Dynamically add a control button to this form 3. Define the "Caption" for this button 4. Assign click event to this button 5. The click event is to delete the form itself 6. Form_Close() also delete the form itself Now, only...
  16. D

    How to prevent Access change string to date

    Thanks Galaxiom. I use the method of "schema.ini" (This is the 1st time I use this stuff) One more question. About the HDR settings. Should it be "Yes" or "No" ? Since I still want to keep the header row in my csv file
  17. D

    How to prevent Access change string to date

    I wrote a VBA code to get the field value of a csv file, then use it to update the database table. I paste some of my code below Dim objConn As New ADODB.Connection Dim objRs As New ADODB.Recordset Dim objUpdate As ADODB.Connection objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &...
Back
Top Bottom