Insert Data From A Form to A Table

DushiPunda

Well-known Member
Joined
Nov 14, 2015
Messages
518
Office Version
  1. 2021
Platform
  1. Windows
Hello,
At work we have an access database that we use for a bunch of different things, but what I'm wanting to do is take data from a form and insert it as a shift log (table). Here's some relevant information:
Table Name: Events
Field Names: EStartD (Date), EStartT (Time), EComments (Log Entry), WSC (Employee Name)

I want to insert information from a form called "MWSC" which contains the following information/fields. In parentheses I will include the applicable field name from the Events table:
Combo13 (WSC)
EStartD (EStartD)
EStartT (EStartT)
Combo15 (EComments)
Text19 (EComments)

So, once the information is filled in, and the "Submit" (Command21) button is clicked, I want to insert the information into the table.

For Combo15, I want that to change the format of the EComments portion:

Option 1: This is a template for option 1 <Text19 Data>.
Option 2: This is a different template, for option 2 <Text## Data>

Eventually there will be some other Combo Boxes and things for option 2, but I haven't added those yet. I just wanted to get the fundamentals down first - being able to add this data into a log entry on the Events table.

Any suggestions on how to proceed? Thanks!
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
I can't seem to find the edit button.

Text19 data only applies to Option 1 from Combo15. That data will be input somewhere into the template.

Option 1: This is a template for option 1 insert Text19 Data blah blah.
Option 2: This is a template for option 2 insert Text## Data blah blah.
 
Upvote 0
I can't seem to find the edit button.

Text19 data only applies to Option 1 from Combo15. That data will be input somewhere into the template.

Option 1: This is a template for option 1 insert Text19 Data blah blah.
Option 2: This is a template for option 2 insert Text## Data blah blah.

I am guessing you built this form from scratch (Blank Form)?
Do you already have some VBA code behind this?
 
Upvote 0
Why not just bound the Form to your table?
Then you don't need to do anything special to have your entry data update your table, it will be automatic, as each field on your Form is bound to a Table field.
 
Upvote 0

Forum statistics

Threads
1,221,831
Messages
6,162,250
Members
451,757
Latest member
iours

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top