Search results

  1. S

    setting a primary key with vba

    Hi: I'm trying to import several spreadsheets from Excel into Access, then perform some "clean up" on the data. I have been able to import the spreadsheets into access tables, and my first task thereafter is to establish a primary key for each of the new tables. I found this code on the web...
  2. S

    Sub to export excel range to new access table

    Hi: I am trying to write a Sub in Excel that would copy a range of cells from a Excel worksheet, and export them as a new table in an Access Database. My code, in Excel VBA is as follows: Public Sub ExportWsToAccessTable() Dim FullOutputPath As String Dim objAccess As Access.Application Dim...
  3. S

    Error 462 when code runs second time

    I wrote some code to evaluate each email as it arrives in MS outlook, evaluate whether it contained useful data, and copy the data from the body of the text. I then wrote the following Sub to send that data to an existing Access database. Everything works exactly as intended when I first run...
  4. S

    Cannot open database after record inserted by vba

    Hi: I have written vba code in Microsoft Outlook that reads each incoming email, selects those whose subject line matches my criteria, then extracts particular data from the body of the message. All that code works as I wish. The attached Sub is intended to take the extracted values and insert...
  5. S

    Data type mismatch error when running sql query

    Hi: I have vba code that creates the following SQL: SELECT SubscheduleID, EventID, WeekOrder, DayID, StartTime, EndTime, Priority, CanJoin, PatientTitle, PatientNickname, IncludesPatient, IncludesAftercare, Letter1 FROM [qryScheduleCombinedDetails] WHERE (SubscheduleID = 1 AND...
  6. S

    using vba custom function in query expression

    Hello: I hope somebody can help with this, because it seems so simple, but still won't work. I have a Module containing the following: <code> Public Const NLetteredConst =2 Public Function NLettered() as integer NLettered=NLetteredConst End Function <code> In a query, I attempted to use...
  7. S

    TransferSpreadsheet fails after upgrade to Excel 2010

    Hi: I have some vba code that previously worked without difficulty. It determines which type of schedule a user wishes to print, then exports the data from the appropriate Access 2003 table into the appropriate Excel 2003 workbook. However, our IT department just upgraded me to Excel 2010...
  8. S

    how to navigate through records on a form based on a value in a text box?

    I have a form that contains two subforms. On the main form, there's a textbox 'txtnInSubforms' that displays the total number of records in the two subforms. This calculation works fine. What I want to do is create vba code that will automatically skip any records where there are no data in...
  9. S

    Back color in continuous subform

    Hi: I have a form with a continuous subform attached. Everything works fine, except that when the form opens, Access automatically gives the focus to the first record in the subform. The problem is that when the first record gets the focus, its background turns white, which is difficult to...
Top Bottom