Writing Data entry from a Form to Table by using VB.

noel_cassidy

New Member
Joined
Feb 19, 2003
Messages
46
Hi all,

First real attempt at creating Access macros,

I've entered a number of details into a form , now based on this info I need to create a large amount of data lines in certain tables,

My problem is selecting the correct Column to enter the data into a new line

e.g

sPart = Form_frmIntoRWL.Part_Number ' List box selection from form

now when I select the table and create a blank new record, how do I get the macro to write "sPart" to the first blank Field(Column) in the new record in the table - and so on.

appreciate any help
thanks
Noel.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
What is the record source for the form?

The idea of forms is you base them on an existing table/query so when you enter a new record or edit an existing one the underlying table(s) is also updated.
 
Upvote 0
Correct, the form is linked to a table, This is what I'm trying to do,

I have a number of roll's of serial numbers that I need to capture into my database, Instead of scanning all the labels in a roll, I what to scan the first and Last serial number. at the same time a record is updated on the table, I want my macro to create a line on the database for all the serial numbers in seq. in between first and last.

So I'm at the stage of creating a new record for each serial number in between, and I need to update each field in the row with similar info as the one created by the link between form and table. Sound easy.......
 
Upvote 0

Forum statistics

Threads
1,221,832
Messages
6,162,255
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