Results 1 to 10 of 10
  1. #1
    Thermalmonster is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    18

    Remember Last Numeric Value on a Form

    Hi Folks

    I have a form with a fields 1 to 15. I want Access to remember the last entry on each of the fields when a new record is created.

    Im using this code



    Private Sub Ctl1_AfterUpdate()
    If Not IsNull(Me.Ctl1.Value) Then
    Ctl1.DefaultValue =Me.Ctl1.Value
    End If
    End Sub



    Click image for larger version. 

Name:	error1.PNG 
Views:	15 
Size:	16.1 KB 
ID:	17471

    Getting compile error Ambiguous missmatch or somthing


    Please Help
    Thanks in advance

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You don't have 2 subs that begin with:

    Private Sub Ctl1_AfterUpdate()

    do you?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Thermalmonster is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    18
    Thanks Paddy
    I dont think so im a bit new at this
    the fields in the form are created from a table with fields 1 to 15
    There are no duplicates

  4. #4
    Thermalmonster is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    18
    Oh it would appear that on clicking the text box in the previous form that it is called Ctl1 also dont know why
    hmmm
    so need to change the name of the othes

  5. #5
    Thermalmonster is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    18
    Now there are no Duplicates and still get same error

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Can you post the db here?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    Thermalmonster is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    18
    Is there a tool for attaching files?

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Yes, go into "Go Advanced" then "Manage attachments". Do a compact/repair and then zip which should make it small enough.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    Thermalmonster is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    18

    Upload

    Ok
    This is the foim trying to create
    Im trto get all the Horizontal chainages be remembered in the nerecord
    the Slope chainages are calcfrom the Horizontal
    Calculatiois done in the Table

    Thanks
    Heaps
    Attached Files Attached Files

  10. #10
    Thermalmonster is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    18
    OK I have this working now, but when you re open the form it does not work untill you have repopulated the form again!!!
    GRRRRRR
    Any Ideas please anyone????

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

Similar Threads

  1. Replies: 3
    Last Post: 03-21-2014, 09:34 AM
  2. Replies: 14
    Last Post: 01-21-2014, 08:19 AM
  3. Just numeric input for all textboxes in the form
    By amd711 in forum Programming
    Replies: 7
    Last Post: 11-27-2012, 08:08 AM
  4. Close form but remember record
    By Mclaren in forum Programming
    Replies: 3
    Last Post: 07-10-2011, 12:02 PM
  5. I saw this done before but don't remember how and where...
    By tigers in forum Import/Export Data
    Replies: 1
    Last Post: 10-15-2006, 05:59 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