Results 1 to 8 of 8
  1. #1
    Alex Motilal is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Nov 2008
    Location
    Coimbatore, India
    Posts
    192

    Combo box shows blank on opening the Form

    Hi everybody
    I have created a Main Form with a Subform. The Main Form contains a Client Combo Box, which on selection, the related records open in the Subform. My problem is:
    1.When the form is opened, a Message Box appears, stating ‘No current record’. On clicking OK, the Form opens. I don’t want this Message Box to show.
    2.When the Form opens, the Combo Box is blank, but the Subform shows records. However, on clicking a client, the relative records open in the Subform. The blank Combo confuses the users. Is there a way to make the Combo Box show the client, whose records are shown in the Subform? Or is it possible that the Subform is also blank?

    Thanks in advance

  2. #2
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    What is displayed in the presumably related subform depends on what is displayed on the related mainform.

    If the mainform is positioned to the correct record on the Form_Open event, the subform will position correctly.

  3. #3
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Alex,
    What code is generating the "No current record" message? Do you have something in the OnOpen or OnLoad or Current event of the MainForm?

  4. #4
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    It could be a form/subform with a non undatable recordset as the row source with criteria that produces no results.

  5. #5
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I don't think that is the case here. Something is going on behind the form that the OP has not explained yet.

  6. #6
    Alex Motilal is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Nov 2008
    Location
    Coimbatore, India
    Posts
    192
    Dear RuralGuy
    There is no code OnOpen or OnLoad or Current event of the MainForm
    Alex

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try importing everything into a new, empty db and see if you still have the same issue. If you do, can you attach your zipped up db so we can look at it?

  8. #8
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    Look at the form event properties, calls to the following subroutines are created automatically (you have to prvide code within same):

    private sub Form_Current()

    end sub

    private sub Form_Load()

    end sub

    private sub Form_Open(Cancel As Integer)

    end sub

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

Similar Threads

  1. How to open a blank form?
    By WhatnThe in forum Access
    Replies: 15
    Last Post: 08-05-2011, 02:41 PM
  2. I want my form to open blank
    By uneek78 in forum Forms
    Replies: 10
    Last Post: 01-12-2011, 01:01 PM
  3. Blank combo boxes
    By ROBBO in forum Forms
    Replies: 3
    Last Post: 01-06-2010, 10:22 AM
  4. blank on entry on add a record form
    By gmee in forum Forms
    Replies: 1
    Last Post: 10-07-2009, 07:31 AM
  5. Replies: 1
    Last Post: 03-15-2009, 04:46 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