Results 1 to 10 of 10
  1. #1
    Join Date
    May 2006
    Posts
    178

    Unanswered: How do i open a form using a selection from a list box?

    Hi guys,

    Any ideas? or guidance please.


    Regards


    Aboo

  2. #2
    Join Date
    May 2005
    Posts
    1,191
    Do you want just that record displayed on the form, or do you want it to open the form and navigate to the specified record? Either way, what have you tried so far? Where are you stuck?
    Me.Geek = True

  3. #3
    Join Date
    May 2006
    Posts
    178
    nckdry,

    Yes i want to display it in a form, I have my list box populated with my search results. now from tha ti want to double click the record i want.

    Im on the lines of

    DoCmd.OpenForm "frmOrder", , , "[OrderID]=" & stSearchResults.Column

    I dont know where to go next, im not sure about he syntax.

    any ideas?

    thanks

    Aboo
    Last edited by aboo; 04-24-09 at 03:22.

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Try

    DoCmd.OpenForm "frmScopeOrder", , , "[OrderID]=" & stSearchResults

    I don't know really where you are stuck though.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  5. #5
    Join Date
    May 2006
    Posts
    178
    Hi trekker,

    Im trying to open the form based on the record i double click.

    Aboo

  6. #6
    Join Date
    May 2005
    Posts
    1,191
    Quote Originally Posted by aboo
    Hi trekker,

    Im trying to open the form based on the record i double click.

    Aboo
    Well now you've officially said the same thing three times, but you haven't really answered either of our questions
    Me.Geek = True

  7. #7
    Join Date
    May 2006
    Posts
    178
    nckdryr,

    im sorry. I want the form to open and navigate to the correct record.
    I have managed to do this with Trekky's post.

    however it seems that even if the list is blank i can click it and it will open the last record i was viewing. How can i create a check?

    Aboo

  8. #8
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    If stSearchResults > "" Then DoCmd.OpenForm "frmScopeOrder", , , "[OrderID]=" & stSearchResults
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  9. #9
    Join Date
    May 2006
    Posts
    178
    Thanks Trekky,

    I cant belive how stupid i feel after reading the code..lol

    Thanks again


    Aboo

  10. #10
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    lol ... I'm sure we've ALL been there!!
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •