473,416 Members | 1,510 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Can I change the rowsource bound column for existing data

nyt
I have a problem of number and text field.
I got the database file(mdb) that contains many combo boxes used and
its list values are created by "value list"
For eg field

Field name= 'furniture' , data type='Number' ,Display Control='Combo
Box', RowSource Type = 'Value List' and
Row Source = ' 0;"chair";1;"Table";2;"Bed" '

Therefore, in data sheet view of table, if we select (1 : Table ) ,
then the value 1 is stored in furniture field.

I want to change the data type of this field 'furniture' to 'Text' and
the data to be assoiated text 'Table' instead of '1' for all data
records entered.

Is there any way to transform all records? please!!!!!!!!!!! help me
i haeve thousands of records to change such fields from 'number' to
corresponding 'text'

Waiting ur reply as soon as possible ,
NYT

Nov 25 '05 #1
13 4136
Do you really want to do this?
You probably have a furniture table that looks like:
TblFurniture
FurnitureID
FurnitureItem
Each furniture item is identified by a unique FurnitureID.

Somewhere in your database you have another table where FurnitureID is a
foreign key Perhaps a house contents table that looks like:
TblHouseContents
HouseContentID
FurnitureID
etc

In this table, furniture items are recorded by their FurnitureID and not
their name. This is the correct way of doing it in a relational database. So
for data entry into this table, your form needs a combobox to select the
furniture item. Because of the table, the value of the combobox must be a
number (FurnitureID). Therefore your Value List is correct as is.

Let us know if your database is like this or is designed differently.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

Over 1000 Access users have come to me for help. My fees are very
reasonable.

"nyt" <na*****@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I have a problem of number and text field.
I got the database file(mdb) that contains many combo boxes used and
its list values are created by "value list"
For eg field

Field name= 'furniture' , data type='Number' ,Display Control='Combo
Box', RowSource Type = 'Value List' and
Row Source = ' 0;"chair";1;"Table";2;"Bed" '

Therefore, in data sheet view of table, if we select (1 : Table ) ,
then the value 1 is stored in furniture field.

I want to change the data type of this field 'furniture' to 'Text' and
the data to be assoiated text 'Table' instead of '1' for all data
records entered.

Is there any way to transform all records? please!!!!!!!!!!! help me
i haeve thousands of records to change such fields from 'number' to
corresponding 'text'

Waiting ur reply as soon as possible ,
NYT

Nov 25 '05 #2
nyt
No my database has no separate tables for each combo.
all the combo select list values are control by just a string in Row
Source as i stated , ( Row Source = ' 0;"chair";1;"Table";2;"Bed" ' ) ,
bound column = 1 , Count Column = 2

i tried by changing the bound column to 1, but it is not OK for
existing data, and only OK for new entriy data.

i have about 70 such combos to change.

Therefore, if another way of solution, PLEASE!!!!!!!!!!!!!!!!!

with regards,
nyt

Nov 25 '05 #3
1. Add a new field to your existing table. Name it (say) FurnitureTypeID. It
can be a text field, and set its Field Size property to whatever is enough
(perhaps 24 or 40 characters.) Save the table.

2. To populate this new field, create a query into this table. Change it to
an Update query (Update on Query menu, in query design view.) Access adds an
Update row to the grid.

3. Drag the Furniture field into the grid.
In the Criteria row under this field enter:
0

4. Drag the FurnitureTypeID field into the grid. In the Criteria row under
this field, enter:
Is Null
In the Update row under this field, enter:
"chair"

5. Run the query, by clicking the exclamation icon on the toolbar.

6. Back to design view, change the Criteria under Furniture to:
1
and the Update row under FurnitureTypeID to:
"table"
Run the query again.

7. Repeat step 6 for the other values as well.

8. After verifying that all the entries are correct, you can delete the
original Furniture field.

To make the task much easier later, it would be a good idea to create a
table to hold all the valid values, and use that as the source for the
combo. To do that as well:
1. Create a new table named (say) FurnitureType, with one Text field named
FurnitureTypeID.

2. Create a query into your original table, selecting just the
FurnitureTypeID field. In the Criteria row under this field, enter:
Is Not Null

3. In the Properties box (View menu), set the query's Unique Values property
to Yes.

4. Change it to an Append query (Append on Query menu).
Tell Access you want to append to the FurnitureType table.

5. Run the query. The table now contains the valid choices.

6. Choose Relationships on the Tools menu, and add both tables to the
screen. Then drag FurnitureTypeID from the FurnitureType table onto the
matching FurnitureTypeID field in the other table. When you let go, Access
pops up the Create Relation dialog. Check the box for Relational Integrity,
and Ok the dialog.

You are now assured that only valid values can appear in the list, but it is
much easier to maintain than the value list.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"nyt" <na*****@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I have a problem of number and text field.
I got the database file(mdb) that contains many combo boxes used and
its list values are created by "value list"
For eg field

Field name= 'furniture' , data type='Number' ,Display Control='Combo
Box', RowSource Type = 'Value List' and
Row Source = ' 0;"chair";1;"Table";2;"Bed" '

Therefore, in data sheet view of table, if we select (1 : Table ) ,
then the value 1 is stored in furniture field.

I want to change the data type of this field 'furniture' to 'Text' and
the data to be assoiated text 'Table' instead of '1' for all data
records entered.

Is there any way to transform all records? please!!!!!!!!!!! help me
i haeve thousands of records to change such fields from 'number' to
corresponding 'text'

Waiting ur reply as soon as possible ,
NYT

Nov 25 '05 #4
nyt
Thanks for ur solution, it work well
but i have to take 6 times (6 items )on each combo.
So it will take so much time for over 70 combos and about 6 items in
each combos ( 70 x 6 ) times will need

is there another way to make by programming coding in vba or in vb

with regards,
nyt

Nov 25 '05 #5
If you are comfortable writing VBA code, you could OpenRecordset using the
SELECT DISTINCT to get the unqiue values. Loop through that recordset,
creating the UPDATE query SQL string for each of the values, and Execute
it.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"nyt" <na*****@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Thanks for ur solution, it work well
but i have to take 6 times (6 items )on each combo.
So it will take so much time for over 70 combos and about 6 items in
each combos ( 70 x 6 ) times will need

is there another way to make by programming coding in vba or in vb

with regards,
nyt

Nov 25 '05 #6
"PC Datasheet" <no****@nospam.spam> wrote in message
news:D9****************@newsread1.news.atl.earthli nk.net...

PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

Over 1000 Access users have come to me for help. My fees are very
reasonable.


I don't know about anyone else but I don't have a problem with this at all.
Have we finally reached a state of harmony?
Nov 25 '05 #7
Still blatantly jobhunting IMO.
==> I would like him to go back to his old sigline.
That sig is 'inviting' enough. We *did* have enough discussion about that ...

Also I don't believe a thing of this 1000 Access users.
1000 users is 1000 databases / problems to work on in 4-5 years??
Or does he mean 1000 emails?

Arno R

"Keith W" <he**@there.com> schreef in bericht news:43**********@glkas0286.greenlnk.net...
"PC Datasheet" <no****@nospam.spam> wrote in message
news:D9****************@newsread1.news.atl.earthli nk.net...

PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

Over 1000 Access users have come to me for help. My fees are very
reasonable.


I don't know about anyone else but I don't have a problem with this at all.
Have we finally reached a state of harmony?


Nov 25 '05 #8
"Arno R" <ar***********@tiscali.nl> wrote in message
news:43********************@dreader2.news.tiscali. nl...
Still blatantly jobhunting IMO.
==> I would like him to go back to his old sigline.
That sig is 'inviting' enough. We *did* have enough discussion about that
....

Also I don't believe a thing of this 1000 Access users.
1000 users is 1000 databases / problems to work on in 4-5 years??
Or does he mean 1000 emails?

I don't believe it either Arno, but I don't care whether or not it's true
and I think it's up to the individual to make that judgement. It still
isn't 100% by the book and I too would like to see the job hunting aspect
completely removed but at least now it's relatively brief and understated
and doesn't form the bulk of his post. :o)
Nov 25 '05 #9
nyt
i am not very good at vba
so please show me some hints

regards,
nyt

Nov 25 '05 #10

"Keith W" <he**@there.com> wrote in message
news:43**********@glkas0286.greenlnk.net...
"PC Datasheet" <no****@nospam.spam> wrote in message
news:D9****************@newsread1.news.atl.earthli nk.net...

PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

Over 1000 Access users have come to me for help. My fees are very
reasonable.

I don't know about anyone else but I don't have a problem with this at

all. Have we finally reached a state of harmony?


Personally, I think it's shameful. Hundreds of consultants post help to
users in CDMA, many frequently. Steve is the only one of them who feels he
is above the charter prohibition on advertising. If no one tells Steve he
can't advertise, there is no reason for all of the others to not do so. But,
like I said before, if others prefer that I not pursue it, I won't.

Randy

Nov 25 '05 #11

"Randy Harris" <ra***@SpamFree.com> schreef in bericht news:pt*****************@newssvr22.news.prodigy.ne t...
> Over 1000 Access users have come to me for help. My fees are very
> reasonable.

Where I live, we would call this sheer jobhunting.
Personally, I think it's shameful. Hundreds of consultants post help to
users in CDMA, many frequently. Steve is the only one of them who feels he
is above the charter prohibition on advertising. If no one tells Steve he
can't advertise, there is no reason for all of the others to not do so. But,
like I said before, if others prefer that I not pursue it, I won't.


Steve is just a disgrace for newsgroups.

Arno R
Nov 25 '05 #12
Why don't you take Salad's advise and grow up and get a life and quit
sending emails to my office.

"If you have anything to contribute to the group, contribute. Your war
with Datasheet is simply pissing and moaning in the wind for the sake of
nothing. Grow up and get a life."

Salad

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

Over 1000 Access users have come to me for help. My fees are very
reasonable.

"Arno R" <ar***********@tiscali.nl> wrote in message
news:43********************@dreader2.news.tiscali. nl...
Still blatantly jobhunting IMO.
==> I would like him to go back to his old sigline.
That sig is 'inviting' enough. We *did* have enough discussion about that
....

Also I don't believe a thing of this 1000 Access users.
1000 users is 1000 databases / problems to work on in 4-5 years??
Or does he mean 1000 emails?

Arno R

"Keith W" <he**@there.com> schreef in bericht
news:43**********@glkas0286.greenlnk.net...
"PC Datasheet" <no****@nospam.spam> wrote in message
news:D9****************@newsread1.news.atl.earthli nk.net...

PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

Over 1000 Access users have come to me for help. My fees are very
reasonable.


I don't know about anyone else but I don't have a problem with this at
all.
Have we finally reached a state of harmony?

Nov 25 '05 #13
Why don't you take Salad's advise and grow up and get a life and quit
sending emails to my office.

"If you have anything to contribute to the group, contribute. Your war
with Datasheet is simply pissing and moaning in the wind for the sake of
nothing. Grow up and get a life."

Salad

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

Over 1000 Access users have come to me for help. My fees are very
reasonable.


"Arno R" <ar***********@tiscali.nl> wrote in message
news:43********************@dreader2.news.tiscali. nl...

"Randy Harris" <ra***@SpamFree.com> schreef in bericht
news:pt*****************@newssvr22.news.prodigy.ne t...
> Over 1000 Access users have come to me for help. My fees are very
> reasonable.

Where I live, we would call this sheer jobhunting.
Personally, I think it's shameful. Hundreds of consultants post help to
users in CDMA, many frequently. Steve is the only one of them who feels he
is above the charter prohibition on advertising. If no one tells Steve he
can't advertise, there is no reason for all of the others to not do so.
But,
like I said before, if others prefer that I not pursue it, I won't.


Steve is just a disgrace for newsgroups.

Arno R
Nov 25 '05 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Robert Stearns | last post by:
Either I missed something, or ALTER TABLE does not have this capability. Is there any way of doing it except DROPping all constraints which mention this table, EXPORTing the data, DROPping the...
3
by: B | last post by:
I know there are several ways to speed up combo boxes and form loading. Most of the solutions leave rowsource of the combo box blank and set the rowsource to a saved query or an SQL with a where...
4
by: DebbieG | last post by:
I have a form based on this query: SELECT Students.LastSerDT, OtherInfo.Served, OtherInfo.HSGradYr, OtherInfo.ActivePart, OtherInfo.Served, Students.SSN, & ", " & & " " & AS Name,...
8
by: bbdata | last post by:
ok i have a problem here and not much time to play round. have a form bound to a table. one of the combos is bound to a field Agents. i have active and retired agents. thing is, i want to be able...
3
by: Richard Hollenbeck | last post by:
I have a column in a table that currently only has one record. That column is set to combo box. I want the user to be able to lookup values from the column itself--the very same column--rather...
0
by: Frnak McKenney | last post by:
Can I use a bound ComboBox for both browsing and editing? I'm working on a small, standalone database application using Visual C#.NET 2003 and an Access data file. In order to keep the number...
5
by: njb35 | last post by:
Hi all I'm beginning my foray from VBA into VB 2005 Express, and enjoying some of the efficiencies it provides! I'm stuck with some dataset handling however that I _think_ can be automated but...
11
by: Simon | last post by:
Dear reader, The syntax for the VBA code to change the RowSource of a Master Report is: Me.RowSource = "TableOrQueryName"
5
by: agarwasa2008 | last post by:
Hi, I have a linked table called tbltest and some bounded forms (which add, update, delete records) that were created using that linked table. For some necessary reasons I had to create another...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.