Results 1 to 3 of 3
  1. #1

    Thread Starter
    Join Date
    Feb 2018

    Resolved [RESOLVED] setting combobox value through VBA

    I would like the [Order Number] combobox to have the same value of [Order Number1] combobox after the user clicks yes or no in messagebox
    Name:  gsdgdfgsdfgsdg.jpg
Views: 125
Size:  23.0 KB

  2. #2

    Thread Starter
    Join Date
    Feb 2018

    Re: setting combobox value through VBA

    here is what i have for my code so far

    NOTE: Me.Combo960 = Me.Combo970 didnt work
    'Me.Combo960 = Me.Combo970
        Answer = MsgBox("record added with order number " + Combo970.Value + " Do you wish to delete this record from Archive?", vbYesNo + vbExclamation + vbDefaultButton2, "Delete Confirmation")
    If Answer = vbYes Then
    DoCmd.SetWarnings False
        sql = "DELETE * FROM Archive WHERE [Order Number] = '" & Me![Combo970] & "'"
        CurrentDb.Execute sql

  3. #3
    Hyperactive Member Arve K.'s Avatar
    Join Date
    Sep 2008
    Kyrksæterøra, Norway

    Re: setting combobox value through VBA

    The documentation for this control describes how to get the result you want. The Adding Items section of the document also include code samples.
    Last edited by Arve K.; Feb 8th, 2018 at 03:08 PM.
    Arve K.

    Please mark your thread as resolved and add reputation to those who helped you solve your problem
    Disclaimer: I am not a professional programmer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


Click Here to Expand Forum to Full Width

By using this site, you agree to the Privacy Policy