Results 1 to 7 of 7
  1. #1
    DaKetch is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2019
    Location
    United States
    Posts
    22

    Entering and Showing a web address

    I have a form that uses a short text field to input a website address. I don't need it to be a hyperlink, just need to store the address if applicable. I then use a combo box combo107.column(8) that holds the address. I have 3 records in the table that combo107 pulls the data from. But for some reason column(8) always returns NULL, even if the field holds data in it. The fields are all marked as Short Text.



    I have noticed that the data is stored in the stored as either http://www.facebook.com/dannyj and www.linkedin.com. Neither will display in my textbox.

    Is there by chance a limit to the number of fields that can be selected in a combo box?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Possibly, but you're not there. The most common cause is the column count property of the combo not being correct (it would have to be 9 in your example).
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    DaKetch is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2019
    Location
    United States
    Posts
    22
    I tried using column(9) and still nothing. Here is my select statement for my Row Source of my combobox. If the ID field starts with subscript 0 then my Agency_Website field would be subscript 8:

    SELECT [tbl_AgencyInfo].[ID], [tbl_AgencyInfo].[Agency_Name], [tbl_AgencyInfo].[Agency_Address], [tbl_AgencyInfo].[Agency_City], [tbl_AgencyInfo].[Agency_State], [tbl_AgencyInfo].[Agency_Zip], [tbl_AgencyInfo].[Agency_Phone_1], [tbl_AgencyInfo].[Agency_Online],[tbl_AgencyInfo].[Agency_Website] FROM tbl_AgencyInfo ORDER BY [Agency_Name];

    I can send a copy if you'd like to see what I have. I know it has to be something really simple.

    I use an Input and an Update form to enter Agency/Employer information then I have data from that table bound to the combo box and then when Activity for the Agencies is input, I populate that bound data into the Activity forms. It should be pretty straight forward, but I am missing something somewhere.

    My code is pretty simple so far:

    Option Compare Database


    Private Sub Combo107_Change()

    If Combo107.Column(2) = "" Then Me.WSI_CAD_EmployerAddress = Combo107.Column(4)
    If Combo107.Column(2) <> "" Then Me.WSI_CAD_EmployerAddress = Combo107.Column(2) & Chr(13) & Chr(10) & Combo107.Column(3) & ", " & Combo107.Column(4) & " " & Combo107.Column(5)
    If Combo107.Column(7) = True Then Label55.Visible = True
    If Combo107.Column(7) = False Then Label55.Visible = False

    Me.WSI_CAD_EmployerPhone = Combo107.Column(6)
    Me.WSI_CAD_EmployerWebsite = Combo107.Column(8)



    End Sub


    Private Sub Form_Load()


    Me.WSI_CAD_EmployerName = ""
    Me.WSI_CAD_EmployerAddress = ""
    Me.Label55.Visible = False

    End Sub

    I know that I am going to feel really dumb once I can figure this piece out.

    Any assistance would be GREATLY appreciated.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    I meant the column count property of the combo, seen in design view. On the Format tab of the Properties window.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    And you can certainly attach the db here if you'd like.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    DaKetch is offline Novice
    Windows 10 Access 2016
    Join Date
    Mar 2019
    Location
    United States
    Posts
    22
    It was the Column Count property. It was set to 7 for each form instead of the 8 that it needed to be. I knew it was going to be a simple fix.

    THANK YOU SOOOOOOOO MUCH!

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Happy to help!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 4
    Last Post: 01-06-2018, 03:26 PM
  2. Replies: 7
    Last Post: 06-27-2016, 12:28 PM
  3. Replies: 2
    Last Post: 08-22-2013, 12:02 AM
  4. Replies: 2
    Last Post: 02-13-2010, 01:54 PM
  5. Input Mask for an IP Address and Mack Address
    By baksg1995 in forum Access
    Replies: 18
    Last Post: 06-23-2009, 12:33 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