Results 1 to 5 of 5
  1. #1
    chetana is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    11

    how to retain some values in text box after submitting form in access

    Hi,



    I want to retain some values in text box but not all, form is bound.Please anyone suggest how to do it.

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Use the forms BeforeUpdate event to set the Default Value property of the controls that you want to carry forward to the next record
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    chetana is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2018
    Posts
    11
    Can you please explain with example.
    1.Form Is Bound
    2.Set Required field to Yes
    3. I'm attaching file below in that file from Customer to Type of order value should remain same till they enter different line items for one PO Item,so i have to keep these fields with same values such that they need not enter the same values again and again.

    Click image for larger version. 

Name:	Capture.JPG 
Views:	18 
Size:	29.8 KB 
ID:	40973

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    In the Forms Before Update event you need one line of code for each value that you wish to carry forward.
    Something like:
    Me.ControlName.DefaultValue = Me.ControlName
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,016
    The 'something like' Bob is talking about is this:

    Me.YourControlName.DefaultValue = """" & Me.YourControlName.Value & """"

    This syntax is valid for Text, Number, DateTime and Boolean Datatypes.

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Replies: 1
    Last Post: 05-24-2017, 02:53 PM
  2. Replies: 2
    Last Post: 08-22-2014, 05:16 PM
  3. Make a text box retain its previous value
    By Sidran in forum Access
    Replies: 3
    Last Post: 08-11-2014, 07:17 AM
  4. How to retain values selected in a listbox
    By Cedarguy in forum Forms
    Replies: 4
    Last Post: 05-09-2012, 10:05 AM
  5. Submitting data from excel to access
    By SilverSN95 in forum Import/Export Data
    Replies: 0
    Last Post: 07-06-2009, 08:19 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