Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 386729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:36:16+00:00 2026-05-12T15:36:16+00:00

So I have an input form that I want to use to update a

  • 0

So I have an input form that I want to use to update a table with certain fields of information. I have the ID of the record automatically coming up in a text box. I have three text boxes that I need to add to the table (excluding the ID) on a button click.

Name
Date
Method

are the field names.

As_Name
As_Date
As_Method

are the text box names

The table name is POC, and the ID is POC_ID (its an autonumber).

So I do not want these objects (text boxes) to be bound to the table because this is a little separate “pop-up” form that comes from a form that the table, and I only want the input to be relative to the POC_ID that is already selected via the original form.

So how do I write the vba for this to 1)check to make sure that records do not already exist….2)update the fields (listed above) with data input from the text boxes(listed above). I want to be able to use this with a button click….


EDIT:

actually it is one table not two; i have two forms that I want to be able to send information to the same table (different information though). this db was already built by someone else and know I have been deamed to take it over.

I need to add a second little pop up form for additional information to be added based on new requirements (there is literally no where for me to place this on the other one). I have already done that, and used a suggested object approach to reference the first forms (from which this second “pop-up” form springs from) to add the relative id fields. Now I have this second little pop up form that just asked three values to be inputted (which are the ones listed above).

I just simply do not know how to link the text box, with a field so that once a user enters in the information, clicks “save” it saves the information to the table relative to the TripID that is there (one mentioned above). the only way I know how to get the text boxes to save data to the table is to use the builder/wizard when I create a new one.

I would like to learn how to link an object (text box, cmb, list) etc on a form, to a table with an “On Click” method so that I can use a save button. Basically that is it!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T15:36:16+00:00Added an answer on May 12, 2026 at 3:36 pm

    Still not sure I understand your situation, but let me offer the outline of an answer. If my outline is not close enough, please explain where I went astray.

    Your parent form, frmParent, has a command button (cmdMoreFields) which opens the child form (frmChild) where you will enter values for 3 additional fields in the record currently displayed in frmParent. After the user enters those values in frmChild (in text box controls named As_Name, As_Date, and As_Method), she will click a command button (cmdSave) to store those values to fields (Name, Date, and Method) in table POC, and close frmChild. Also, frmParent includes a text box (txtPk_field) which holds the value for the primary key (field pk_field in table POC) of the current record.

    However, I’m not sure which field/control you’re using for txtPk_field, and doubt that value is available if the the current record has not yet been saved. So, I’ll suggest this code for the cmdMoreFields “on click” event:

    If Me.Dirty Then Me.Dirty = False
    DoCmd.OpenForm "frmChild"
    

    In the “on click” event of cmdSave (on frmChild), try code similar to:

    Dim strSql As String
    strSQL = "UPDATE POC SET [Name] = """ & Me.As_Name & """, [Date] =#" _
        & Me.As_Date & "#, Method = """ & Me.As_Method & """ WHERE pk_field = " _
        & Forms!frmParent.txtPk_field & ";"
    Debug.Print strSql
    CurrentDb.Execute strSql, dbFailOnError
    DoCmd.Close
    

    If that approach works, consider passing the pk_field value to frmChild with Openargs, as Remou suggested.

    Note: I assumed the data type for Name is text, Date is date/time, and Method is text. You will have to change the UPDATE statement delimiters for any fields whose data types differ from my guesses.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this select input in my form that I want to access via
I have a form that uses jquery to generate rows of input fields these
I have a form that sends money value e.g <input type=text name=amount value=N50,000.00 NGN
I have a dynamic form that users can add/delete sets of input fields. I
I have an ASP.NET MVC3 app that features a form with a nested-table input
I have a <form> that looks like this: <form> <input type=text name=name id=name /><span
I have a form input in my application that accepts dates in the format
As input I have a set of triangles that form concave mesh with holes.
So I have a form that accepts some input from a user that may
I have a form that I pre-populate with test data though jQuery. $('INPUT[name=subscription.FirstName]').val('Jef'); but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.