none
How do you make a particular string appear in a SUBFORM'S textbox after a particular selection is made in the MAIN FORM'S combobox?

    Question

  • I have a main form with a combobox named "Device type". After the user selects a device type, I want a particular string to appear in the "DeviceID" textbox of the subform named "Device Type Information". How do I do this? Snippet of code below:

    Private Sub Device_Type_AfterUpdate()

        Select Case Device_Type.Value

            Case "All-in-one":
            'I don't know what to put here

        End Select

    End Sub

    Or better yet, make a default value.

                          
    • Edited by Bon qui qui Wednesday, December 12, 2012 4:18 PM
    Wednesday, December 12, 2012 4:14 PM

Answers

  • You could use

    Me.[Device Type Information].Form!DeviceID.DefaultValue = ...


    Regards, Hans Vogelaar

    • Proposed as answer by Sandra VO Wednesday, December 12, 2012 6:18 PM
    • Marked as answer by Bon qui qui Wednesday, December 12, 2012 8:12 PM
    Wednesday, December 12, 2012 4:45 PM

All replies

  • You could use

    Me.[Device Type Information].Form!DeviceID.DefaultValue = ...


    Regards, Hans Vogelaar

    • Proposed as answer by Sandra VO Wednesday, December 12, 2012 6:18 PM
    • Marked as answer by Bon qui qui Wednesday, December 12, 2012 8:12 PM
    Wednesday, December 12, 2012 4:45 PM
  • Me.[Device Type Information].Form!DeviceID.DefaultValue =  """text"""
    Wednesday, December 12, 2012 8:13 PM