Consulting

Results 1 to 3 of 3

Thread: Get the record number out of a List

  1. #1
    VBAX Newbie
    Joined
    Jul 2010
    Posts
    3
    Location

    Get the record number out of a List

    Hello guys!

    I m struggling with a small problem and i hope you guys can help me.

    I m using Access2k7 and i have built up a small tool with a form based on a table to work with the records in the table.

    In my Form i have a List displaying all the records in my table.
    What i m now trying to do is marking a record in my List, click a Button and get the Number of this record.

    The plan is to open another form for editing the record, and i need the number to navigate to the marked record in the new form.

    I do have an ID Autovalue but this is not equal to the number of the record since sometimes i have to delete a record and the ID just remains the same with the deleted one missing.

    I would like to solve this with VBA so i d be happy if you guys knew help!

    Thanks in advance!

    Regards,

    Oliver

  2. #2
    VBAX Guru
    Joined
    Mar 2005
    Posts
    3,296
    Location
    Oliver, I am not sure why you are using a List rather than a Form in Continuous Mode or a Subform?

  3. #3
    VBAX Newbie
    Joined
    Jul 2010
    Posts
    3
    Location
    Quote Originally Posted by OBP
    Oliver, I am not sure why you are using a List rather than a Form in Continuous Mode or a Subform?
    i already thought about using a subform as well but i decided to use a list because its safer...

    this tool is made for guys who are not that good in using such stuff so it has to be as safe as possible... they shouldnt be able to accidantly change something of the records.

    So i built the form for working with the data based on a list with all the stuff around it.
    Furthermore i now have the ablity to create a logfile system putting every action like a clicked button into an own logfiletable which is important for our stockmanagement


    Btw i already found a solution for my problem:
    dummy = Me!ListeBtl.Value
    IDs = DLookup("ID", "tbl_mech_Bauteile", "[ID] Like " & Chr$(34) & dummy & Chr$(34))
    DoCmd.OpenForm "frm_mech_Bauteil_hzf", , , "[ID]=" & CStr(IDs)

Posting Permissions

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