Results 1 to 4 of 4
  1. #1
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051

    Cant refer to combobox after message box

    Procedure is as follows:

    select option from combobox

    cboPaper_onchange() kicks in and message user to say what to do next with a basic information message box.



    But when I try to refer to a column in the combobox after that

    me.cbopapers.column(2)

    I get a null

    Without the message box it works beautifully. But I need the messagebox

    What's happened?

    Code:
    Debug.Print Me.cboPapers.Column(0)
    MsgBox "please select the students who you wish to sit the " & Me.cboPapers.Column(1) & " paper and press the update button.", vbInformation
    Me.SetFocus
    Code:
    rs!PaperID_FK = Me.cboPapers.Column(2)

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Don't need Me.SetFocus, although it doesn't seem to hurt in this case.

    Can't replicate the issue. Code works for me. Would have to review your db.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    DBschoolexamPapersvtest11.zip

    As requested June

    The form is FrmSelectTiers

  4. #4
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    A tough week - changed the bound column to a column beyond the 5 in the cbobox.

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

Similar Threads

  1. How to refer from one product to another
    By ManuelLavesa in forum Programming
    Replies: 8
    Last Post: 01-23-2016, 07:45 AM
  2. how to refer to if attachment count is zero vba
    By aspen in forum Programming
    Replies: 3
    Last Post: 05-03-2012, 05:56 AM
  3. Refer to ONLY THE MONTH??
    By taimysho0 in forum Programming
    Replies: 18
    Last Post: 01-27-2012, 01:12 PM
  4. Coloring a combobox as error message?!
    By Lidwina in forum Forms
    Replies: 1
    Last Post: 03-03-2011, 11:12 AM
  5. Replies: 0
    Last Post: 10-29-2009, 08:55 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