Results 1 to 2 of 2

Thread: List box

  1. #1
    Join Date
    Mar 2004

    Unanswered: List box

    I have a table tblCircleSectors.
    It consist of:
    SectorName Gegin End

    For example:
    S1 22 40
    S2 190 250

    I built a form that has ListBox witch linked to the tblCircleSectors.
    I Access to seek the proper sector in the table when I double-click on the sector name in the list box,and open small form with the proper sector to change it's data.
    I mean: When I double-click on S10 (for example) in the ListBox, Access open small form (frmChangeSector), In the form I see S10 data, and then I can change the sector limits to update the table.

    How I can do that.

    Please help.


  2. #2
    Join Date
    Feb 2004
    Chicago, IL
    Make sure your frmChangeSector is based on the table tblCircleSectors. Then when you double click on the list box open the form frmChangeSector like this:

    DoCmd.OpenForm "frmChangeSectors",acNormal,,"SectorName='" & lstSectors & "'",acFormEdit,acDialog

    The key is the fourth parameter. That limits the form to only showing the sector that the user clicked on. The command assumes that your list box is named lstSectors. Then after the line to open the form you might want to requery the list box if it shows the upper and lower limits.


Posting Permissions

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