Results 1 to 3 of 3
  1. #1
    nkenney is offline Advanced Beginner
    Windows 2K Access 2007
    Join Date
    Mar 2009
    Posts
    40

    What is wrong with this code?

    Hi!

    I am attempting to pass 2 arguments into a form. They are separated with a ";".
    I have the following code:


    Private Sub Form_Load()

    If Not IsNull(Me.OpenArgs) Then
    ' Get custid and tag from OpenArgs

    Custid = Left(OpenArgs, InStr(OpenArgs, ";") - 1)

    Tag = Right(OpenArgs, InStr(OpenArgs, ";") + 1)
    End If
    End Sub

    What am I doing wrong?

  2. #2
    ChrisO is offline Novice
    Windows XP Access 2003
    Join Date
    Aug 2005
    Location
    Brisbane, Australia
    Posts
    27
    Rather than the Right function try the Mid function.

  3. #3
    nkenney is offline Advanced Beginner
    Windows 2K Access 2007
    Join Date
    Mar 2009
    Posts
    40

    It worked! Thanks!

    Thanks a bunch!

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

Similar Threads

  1. Anything wrong with this one line of code?
    By alsoto in forum Reports
    Replies: 3
    Last Post: 07-01-2009, 09:23 AM
  2. What's wrong with this expression
    By tallroger in forum Access
    Replies: 1
    Last Post: 05-05-2009, 04:00 PM
  3. Compiler WRONG example-DB
    By pacala_ba in forum Access
    Replies: 12
    Last Post: 04-18-2009, 01:00 PM
  4. What am I doing wrong?
    By brandon in forum Access
    Replies: 2
    Last Post: 08-03-2008, 10:26 AM
  5. DMax returning wrong value
    By nedbenj in forum Access
    Replies: 7
    Last Post: 10-24-2007, 10:30 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