Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2012
    Posts
    68

    Unanswered: Do not remove text from textbox when form submitted

    I have 3 boxes.

    Job Number: (Text BOx)
    Material: (ComboBox)
    Quantity: (Text Box)

    I enter a Job number.
    select material then add a quantity and enter.

    Inserts that data into a table.

    I want to be able to enter more data for that Job Number without having to update the JOb number field everytime.

    Looked through the code builder a bit, but cant seem to find anything. Little help?

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    How about:

    Forms: Carry current value of a control to new records

    I personally would use the after update event of the control rather than a button.
    Paul

  3. #3
    Join Date
    Mar 2012
    Posts
    68
    Currently I don't have any buttons. When the last text box is filled I press enter and that submits the data to the table. I will look into your suggestion.

    opps nevermind i read the whole link. Thanks again
    Last edited by bsigmon1103; 03-13-12 at 20:11.

  4. #4
    Join Date
    Mar 2012
    Posts
    68
    Quote Originally Posted by pbaldy View Post
    How about:

    Forms: Carry current value of a control to new records

    I personally would use the after update event of the control rather than a button.
    Getting and error. here's thecode

    Code:
    Private Sub Job_Number_AfterUpdate()
        Const cQuote = """"  'Thats two quotes
        Me!jobnumber.DefaultValue = cQuote & Me!jobnumber.Value & cQuote
    
    End Sub

  5. #5
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    I wonder what the error is?

    Does this work?

    Me.Job_Number.DefaultValue = cQuote & Me.Job_Number.Value & cQuote
    Paul

  6. #6
    Join Date
    Mar 2012
    Posts
    68
    Quote Originally Posted by pbaldy View Post
    I wonder what the error is?

    Does this work?

    Me.Job_Number.DefaultValue = cQuote & Me.Job_Number.Value & cQuote
    Works perfectly! Seems the explinations and added underscores is what did it. THanks a bunch man!

  7. #7
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Happy to help!
    Paul

Posting Permissions

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