Access questions

mac_see

Active Member
Joined
Oct 15, 2002
Messages
419
I have two questions:

1. Can I insert 500 blank records in a table with two fields?

2. In a table, I have two fields and 5 records. Can I copy the content of field2 below field1?

eg.
This is how the data looks like
Field1 Field2
a z
s d
d d
f g
g c

After copying, it should look like this:
Field1
a z
s d
d d
f g
g c
z
d
d
g
c

I don't want to use excel for this. Can anybody tell me how I can accomplish this in Access?

Maxi
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
You could use an append query.

The SQL statement would look something like this:

INSERT INTO Table1 ( Field1 )
SELECT Table1.Field2
FROM Table1
WHERE (((Table1.Field2) Is Not Null));

BTW is this related to your other post?
 
Upvote 0
No it is not related to my othe post and that is the reason I have made a new post for this question.

Append query works fine. Thank you.

My first question was Can I insert 500 blank records in a table with two fields?

Maxi
 
Upvote 0
Yes, you can insert blank records, but why would you need to do something like this?

I'm asking because, I have a suspicion that what you're asking for might be part of the "hard way" to accomplish some goal. Please share a little bit more about why you need 500 blank records...with a little information we might be able to give you a simpler way to do things.

Mike
 
Upvote 0
Now it is not required because the SQL thing is working for me. All i wanted to know was if I have lets say 5 fields and I wanted to copy that data one below the other (the same way how I did it for append).

I need an explanation of the below syntax given by Norie

INSERT INTO Table1 ( Field1 )
SELECT Table1.Field2
FROM Table1
WHERE (((Table1.Field2) Is Not Null));


What will I have to change if I have 31 fields with 4 records?

I want to append the last 30 fields under field1, then the last 29 fields, under field1 and go on till I have only one field with all the data under it so there will be 124 records (31*4)

Maxi
 
Upvote 0
Maxi

As I said in a previous post I think you would need to use VBA to do what you want.
 
Upvote 0

Forum statistics

Threads
1,221,842
Messages
6,162,333
Members
451,759
Latest member
damav78

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