Skip to main content

Search

Search

Radio Buttons To Select Database Field For Upc-A Using Vb Script

Comments

3 comments

  • Avatar
    Shotaro Ito

    You need to have your own database connection in dropdown's VB script, like topic below.

     

    http://forums.seagullscientific.com/index.php?/topic/595-vb-script-dropdown-list-excel/

    0
  • Avatar
    Ian Cummings
    Moderator

    Set a name for the data source that is set by the radio button.  This is so we can reference its state in a VB script. 

     

    Create a multi-line VB script for the barcode object and use a conditional statement to test the value of the named radio button data source.

     

    Example:

    If Format.NamedSubStrings("MyRadioButton").Value ) "X" Then
       value = Field("Table1.Field1","12345")
    Else
       value = Field("Table1.Field2","12345")
    End If
    
    0
  • Avatar
    Legacy Poster

    You need to have your own database connection in dropdown's VB script, like topic below.

     

    http://forums.seagullscientific.com/index.php?/topic/595-vb-script-dropdown-list-excel/

     

    Shotaro I - I was unable to use your suggestion but thank you for offering assistance just the same.

     

     

    Set a name for the data source that is set by the radio button.  This is so we can reference its state in a VB script. 

     

    Create a multi-line VB script for the barcode object and use a conditional statement to test the value of the named radio button data source.

     

    Example:

    If Format.NamedSubStrings("MyRadioButton").Value ) "X" Then
       value = Field("Table1.Field1","12345")
    Else
       value = Field("Table1.Field2","12345")
    End If
    

     

    Ian C - It took some work, trial and error but I was able to build from your suggestion and now have exactly what I needed. I have a 16 selection radio button input that changes the barcode to the desired UPC-A code from different database fields as named data sources. Thank you. Your assistance is very much appreciated.

    0

Please sign in to leave a comment.