Results 1 to 8 of 8
  1. #1
    dwe73 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    5

    Form for Last Record?

    I have a fairly elaborate database set up and I have everything working well with 3 tables, 18 forms and 3 queries so far!
    What I need now is the syntex neccessary to call up the last record that contains a certain value in a field and then populate other fields to show the record on a form.

  2. #2
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451
    so you're looking for the last saved record? check out
    https://www.youtube.com/watch?v=d2PI6w_J95Y

  3. #3
    dwe73 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    5
    Unfortunately No! I am Looking for the Last Record having a certain Value in a ComboBoxed field! In say the combo box they choose "A" then I want to find the last record with the value "A" and then populate other text boxes on my form with the rest of the record fields. Make any sense?

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    How do you define "the Last Record"?

    The last record changes depending on how the records are ordered (sorted). And a table is a "bit bucket". There is no order. So you need to sort the records.

    Say there are 15 records that has 4 fields: a PK field (autonumber), a text field that has an "A" as data, an amount field and a dateTime field.
    You create a query. If you don't apply a sort order, the "Last Record" *could* change each time you open the query.
    Now you sort on the amount field. What is the last record??
    If you sort on the date field, you have a different "last record'.
    If you sort on the amount field AND the date field, there is a different "last record".


    Would you elaborate on what you define the "Last Record" should be?

  5. #5
    dwe73 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    5
    I need the Last Record by Date & Time that has a particular Value in a specific field! say the field is a combo box with choices A, B, or C and there will be say 4 records for each choice and I need to call up the last A record, the last B Record, and the last C Record and have them populate a current status form!

  6. #6
    vicsaccess's Avatar
    vicsaccess is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    451
    sounds like you need a form based on a query with the combo box as the where clause. can you post the DB?

  7. #7
    dwe73 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2015
    Posts
    5

    Attatched is a sample DB!

    I put this sample together quickly to demonstrate my needs! There are two right off the bat!

    1. The method to use the passwords to login and establish the security level thereby allowing only the managers to open the Manager Tab & only the Supervisors to open the Supervisor Tab, But allowing the Admin to open All Tabs!

    2. The ability to establish the queries neccesary to have The Bldg Statuses posted to the frmStatus!

    3. I also will need the code to effect a Change Password Form.

    ALL HELP will be Deeply Appreciated!
    Attached Files Attached Files

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    DB security is a common topic - search forum. Start with: https://www.accessforums.net/access/...gin-23585.html

    Be aware that holding down shift key when opening db will bypass database option settings and Autoexec macro. https://www.accessforums.net/modules...ide-53679.html

    I presume frmNavigation is the form with the 'tabs'. I don't like and have never used Navigation form. I find it harder to manage with VBA code. I have done what you describe (programmatically hide tabs based on some criteria) with a normal form and Tab control.


    However, this appears unrelated to the original topic of this thread and should be a separate thread. So what form and combobox are involved in the original issue?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 4
    Last Post: 07-21-2015, 02:50 PM
  2. Replies: 4
    Last Post: 05-25-2015, 07:17 PM
  3. Replies: 6
    Last Post: 02-02-2015, 02:14 PM
  4. Replies: 3
    Last Post: 03-09-2013, 10:39 AM
  5. Replies: 2
    Last Post: 07-30-2012, 09:18 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