Results 1 to 5 of 5
  1. #1
    DOHillier is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Oct 2017
    Posts
    9

    Tables not Updating from Forms

    Good afternoon,



    I am making a database recording vessel day to day activities based on their operational messages sent to an operations centre. I seems to be making good progress however I have come up against two more issues

    Data entry is accomplished using a Form, which is stored in a table. The form uses a drop down menu to select a vessel. However when I create a new record in the form, the vessel name is not being stored in the table. I suspect it has something to do with the dropdown menu, which is linked to the vessel tombstone data. Is there a way to fix this?

    Second, I'm trying to save data entry time when creating a new record by defaulting the new record fields to the previous entry [items such as vessel CO, sailing order, etc change rarely]. Is there a way to do this without using VBA code? If not then, as a total code noob, how would I code it?

    Many Thanks in Advance
    D

    Dale Hillier

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Really need to know more about data structure. For a start, provide settings for the combobox properties.

    ControlSource
    RowSource
    BoundColumn
    ColumnCount
    ColumnWidths

    Carrying forward a value from a newly created record to another new record is a common topic and does require code. Review http://access.mvps.org/access/forms/frm0012.htm

    If you want to provide db for analysis, follow instructions at bottom of my post.
    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.

  3. #3
    DOHillier is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Oct 2017
    Posts
    9
    ControlSource = Vessel ID
    RowSource = SELECT [Vessel Tombstone].[ID], [Vessel Tombstone].[Vessel Name] FROM [Vessel Tombstone] ORDER BY [ID], [Vessel Name];
    BoundColumn = 1
    ColumnCount = 2
    ColumnWidths = 0cm;2.542cm

    Database attached, sanitized as per your instructions.
    Attached Files Attached Files

  4. #4
    Join Date
    Apr 2017
    Posts
    1,673
    Quote Originally Posted by DOHillier View Post
    Second, I'm trying to save data entry time when creating a new record by defaulting the new record fields to the previous entry [items such as vessel CO, sailing order, etc change rarely]. Is there a way to do this without using VBA code? If not then, as a total code noob, how would I code it?
    Create an unbound form;
    Add unbound combos for selecting vessel CO, sailing order, etc at top of form;
    Insert your form into unbound form as subform;
    In subforms properties, set manually Link Master Fields property to list of unbound combos, and LinkChildFields to list of matching table fields.

    Whenefer you ad a new row into subform, matching values from main form combos are inserted into subform controls. And the subform is filtered by combos in main form.

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    First, should not save both VesselID and VesselName, just the VesselID. Since you are linking an autonumber PK field to a number FK field, saving the VesselID is correct.

    Second VesselTombstone should not be in Relationships builder twice.

    Third, advise not to use spaces in naming convention.

    Fourth, Arvi's suggestion might work pretty good.
    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: 1
    Last Post: 12-11-2013, 01:18 PM
  2. Forms, subforms & updating Tables
    By LMA in forum Forms
    Replies: 0
    Last Post: 05-12-2013, 08:04 PM
  3. Updating tables from FORMS
    By devxweb in forum Forms
    Replies: 4
    Last Post: 12-18-2012, 02:06 PM
  4. Updating through forms
    By vomov in forum Forms
    Replies: 3
    Last Post: 10-31-2012, 09:44 AM
  5. Forms updating two tables New Question
    By Canadiangal in forum Forms
    Replies: 3
    Last Post: 08-28-2012, 10:15 PM

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