Possibly newbie question about formulas

daja

New Member
Joined
Nov 6, 2002
Messages
12
Hi,

I was wondering if anyone can help me out with this.
I have a row in my access table that looks like this:::

Code:
abc.1      1     default.1

I need to copy this 16000 times and every time the last character should auto increment itself like

Code:
abc.2      2     default.2
abc.3      3     default.3
abc.4      4     default.4

and so on.

Can anyone tell me what kind of formula would accomplish that?

Thanks in advance,

Daja.
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Do you just want to store these values in your table? If so, I suggest doing this in Excel and then importing the sheet into Access. Let us know if you need help doing this.

-rh
 
Upvote 0
Hi Russel,

I do need help doing it. I have never worked with Excel. I would appreciate some help on the matter.

TIA,

daja.
 
Upvote 0
Hi daja,

There's a few ways to accomplish what you need, I'll suggest one easier method, and that is to use a form and a loop.

I'm having a very hard time trying to figure out exactly what you're doing, or what you've got, so I'll provide a generic solution.

Make a form that refers to the table that contains the data you mentioned. make sure the table has an autonumber field.

Add an unbound textbox to the form that will hold the number of records you need to create (I'll call it TxtRec). Add blank fields to the able that will hold these new values you want to make, I can't tell how many you have.

Autonumber field control is TxtID
Control holding ABC is TxtABC
Control to hold ABC.1 is TxtABC1
Control to hold default is TxtDef

I have no idea if all of these values are supposed to be generated or what, so I'll assume you have only ABC and a number.

Use a loop like this (called by a button perhaps):
Code:
CmdGenerate_Click()

Dim i as integer

For i = 1 to TxtRec
TxtABC1 = TxtABC & "." & TxtID
TxtDef = "Default." & TxtID
DoCmd.GoToRecord , , acNewRec
i = i+1
Next

End Sub

I like this method because you can specify how many records you need to generate, and then just hit the button to make 'em.

HTH,
 
Upvote 0
I don't know if this will help or not but you could try going into Excel,

Typing in the first row of data;
when you get to the first cell of the data that you want to be in series, right click on the cell and drag down. When you release the mouse button a menu will come up. choose the option "Fill Series" This will fill in the data in series matching the data types that you have entered. This will work will alpha and numeric data. You can also make more detailed changes to the series format from this menu as well

Then you can import that data into Access.

Hope that helps, Post back if it dosen't

Sunshine!
 
Upvote 0

Forum statistics

Threads
1,221,531
Messages
6,160,367
Members
451,642
Latest member
mirofa

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