"AutoPopulate Table Fields"

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
2,347
Office Version
  1. 365
Platform
  1. Windows
"Auto-Populate Table Fields" probably not the most accurate description, but close enough.

If you have a Table with an AutoNumber Field and a date field is it possible to have a formula, whether its done through VBA, .Net, Queries.., that takes a Date that the users specifies and populate the First 60 Records with sequential dates (Months)?

For instance; Record One will have a 1 in the autoNumber field. A potential formula could be some kind of EOMONTH formula with a condition to stop a Loop formula when the Autonumber = 60. Or any other creative solution.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Why not just create the data in Excel, and then simply import that data into an Access table?
 
Upvote 0
"Auto-Populate Table Fields" probably not the most accurate description, but close enough.

If you have a Table with an AutoNumber Field and a date field is it possible to have a formula, whether its done through VBA, .Net, Queries.., that takes a Date that the users specifies and populate the First 60 Records with sequential dates (Months)?

For instance; Record One will have a 1 in the autoNumber field. A potential formula could be some kind of EOMONTH formula with a condition to stop a Loop formula when the Autonumber = 60. Or any other creative solution.


Yes this is definitely possible to do within Access using VBA code. I assume this is something that you will need to repeat often.

That said, Would I do it? Probably not. I have yet to see a good reason to mass create a bunch of blank records.

I am confused about what sequence you need. You mentioned dates and also something like 1,2,3,4,5,6,7,8,9,10,11,12,13,14 ..... 59,60. What is the sequence you need?


When you aid autoNumber field are you referring to the datatype or an application defined auto populating sequence?
 
Last edited:
Upvote 0
I hired a Freelancer to do it, and they were able to. Its doing the job I need

I needed it because I have a Table where people enter their total hours worked by Month. I didn't want to use a table where they would have to select a month from a pull-down and then add the hours in the next field. (this is not a traditional time tracking db. they are tracking their time by item, by department and then by month.) So if I build the table of months with a sequential numbering, I know the first field they enter hours in is month one. with this new table I know exactly which month is month one.
 
Upvote 0

Forum statistics

Threads
1,221,713
Messages
6,161,463
Members
451,708
Latest member
PedroMoss2268

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