Results 1 to 4 of 4
  1. #1
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169

    combo box no longer auto-populates after exporting to a new db


    I just created a new module/form seperately from my current db. Everything works perfectly, but now I want to import into my existing db. I have imported the form and associated table and no matter what I do my combo box no longer functions. In the fields where the data populates, I have a "#Name?" in the text box. I have tried recreating the combo box....same thing. I have tried exporting TO the current db FROM my test db....same thing. No matter what I do my combo box no longer functions within my current db.....only in my seperate db. Any thoughts?

  2. #2
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    Is the SQL statement in the record source (properties) correct for the combo box. What happens when you open the underlying query? Does it have the correct data in it?

  3. #3
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    I think I have narrowed it down to the fact that my development db was an mdb file and my working db is a accdb file. But I tried coverting it to accdb file before importing it into my working db, but the issues persist. I can even recreate the form from scratch within my working db and the combo box works UNTIL I add the following vbscript for my command button on the form:

    Private Sub Command20_Click()
    Dim mess_body As String
    Dim appOutLook As Outlook.Application
    Dim MailOutLook As Outlook.MailItem
    Set appOutLook = CreateObject("Outlook.Application")
    Set MailOutLook = appOutLook.CreateItem(olMailItem)

    Set appOutLook = CreateObject("Outlook.Application")
    Set MailOutLook = appOutLook.CreateItem(olMailItem)
    With MailOutLook
    .BodyFormat = olFormatRichText
    .To = Me.To_Address
    .CC = Me.CC_Address
    .Subject = Me.Mess_Subject
    .HTMLBody = Me.Text65
    If Left(Me.Mail_Attachment_Path, 1) <> "<" Then
    .Attachments.Add (Me.Mail_Attachment_Path)
    End If
    '.DeleteAfterSubmit = True 'This would let Outlook send th note without storing it in your sent bin
    .Send
    End With
    'MsgBox MailOutLook.Body
    Exit Sub
    email_error:
    MsgBox "An error was encountered." & vbCrLf & "The error message is: " & Err.Description
    Resume Error_out
    Error_out:



    ...as soon as I add that script I get the #Name? on the fields and the button does not work. I get the error :

    "the expression On Click you entered as the even property setting produced the following error: user-defined type not defined"

  4. #4
    alansidman's Avatar
    alansidman is offline Indifferent
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,536
    What does the combo box if anything have to do with the code you have shown?

    Alan

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 11-04-2011, 01:50 PM
  2. Combo Box Populates Textboxes
    By alyon in forum Access
    Replies: 11
    Last Post: 07-19-2011, 11:55 AM
  3. Replies: 3
    Last Post: 07-31-2010, 07:41 AM
  4. Replies: 7
    Last Post: 11-16-2009, 11:56 AM
  5. Tried and true programs no longer run
    By Seckert in forum Access
    Replies: 0
    Last Post: 04-07-2009, 01:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums