Results 1 to 3 of 3
  1. #1
    SwaziMan is offline Novice
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    3

    OpenArgs Problem: Error 438

    Private Sub Form_Load()


    If Len(Me.OpenArgs & "") > 0 Then
    Me![QstnID].DefaultValue = Me.OpenArgs
    End If
    End Sub

    I keep getting an error 438

    Object doesn't support this property or method

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try:
    Me.QstnID.DefaultValue = Chr(34) & Me.OpenArgs & Chr(34)

  3. #3
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    If RG's reply doesn't work, I am thinking that it is trying to set the default of the field instead of control which won't work. So use the dot instead of the bang:

    Code:
    Private Sub Form_Load()
    If Len(Me.OpenArgs & vbNullString) > 0 Then
       Me.QstnID.DefaultValue = Me.OpenArgs
    End If
    End Sub

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

Similar Threads

  1. Replies: 8
    Last Post: 08-03-2011, 09:09 AM
  2. OpenArgs problems - FAO pbaldy/ruralguy
    By l3111 in forum Forms
    Replies: 22
    Last Post: 06-06-2011, 08:46 AM
  3. Open a second form using the OpenArgs
    By blueraincoat in forum Forms
    Replies: 6
    Last Post: 06-02-2011, 06:19 AM
  4. Showing OpenArgs in a Report.
    By SIGMA248 in forum Programming
    Replies: 2
    Last Post: 04-01-2011, 11:57 AM
  5. Opening a form with openargs and things
    By mwabbe in forum Forms
    Replies: 5
    Last Post: 09-29-2010, 11:01 AM

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