Try this:
Dim fso 'File System Object
Dim strTargetFile, strRootDir, strEntirePath
'setup file Path and name
strRootDir = "C:\Documents and Settings\raedad\Desktop\"
strTargetFile = txtFileToOpen.Value & ".xls" 'If user enters file to open in txtbox
strEntirePath = strRootDir &...
I am adding records to an excel file from an access form using:
Set rec = db.OpenRecordset(strSQL, dbOpenSnapshot)
Set xlApp = CreateObject("Excel.Application")
Set xlSheet = xlApp.Workbooks.Open(strPath).Sheets(1)
Set xlbook = xlApp.Workbooks.Open(strPath)...
I am trying to build an Update query but cannot get it to work no matter what I try. I have two tables, tblWFA & tblAdd. They are joined on the field tblWFA.SprLastName & tblAdd.Supervisor. I want to update the Supervisor field in tblAdd with the SprLastName field in tblWFA when...
I am having trouble copying a record from access to excel in vba. I need the code to copy one record [that is entered on a form] at a time, instead of the entire recordset. I am using copyfromrecordset. Is there a better way of doing it? The table is not indexed, so i don't know how to specify...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.