A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Combo Box AfterUpdate Help



 
 
Thread Tools Display Modes
  #1  
Old January 4th, 2006, 01:13 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default Combo Box AfterUpdate Help

I have two tables, TableA and TableB. In a form I use a combo Box to select
data from Field1 in TableA and place it in Field2 in TableB. What is the
exact command I put in the AfterUpdate field of the combo box to also take
data from Field3 of TableA and place it in Field4 of TableB.

Thank you
  #2  
Old January 4th, 2006, 01:24 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default Combo Box AfterUpdate Help

If you feel you need to store redundant data, you can use the after update
event of the combo box with code like:

Me.txtField4 = Me.cboFieldB.Column(x)

Replace x with the correct column number from your combo box's row source.
These are numbered beginning with 0.

--
Duane Hookom
MS Access MVP
--

"Harry Thomas" wrote in message
...
I have two tables, TableA and TableB. In a form I use a combo Box to select
data from Field1 in TableA and place it in Field2 in TableB. What is the
exact command I put in the AfterUpdate field of the combo box to also take
data from Field3 of TableA and place it in Field4 of TableB.

Thank you



  #3  
Old January 4th, 2006, 01:26 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default Combo Box AfterUpdate Help

Harry

In a well-normalized relational database, it is rarely necessary or
desirable to take data from a field in one table and put it in another
table. If you are using Access, but your data isn't particularly
well-normalized, you will find it much more difficult to make effective use
of Access' many features & functions.

Could you provide an example with real (or imaginary) data of what you
asked? Could you provide a description of your tables/fields? I ask
because there may be a way to accomplish what you want to, even though it
doesn't use the (same) method that you've come up with.

--
Regards

Jeff Boyce
Office/Access MVP

"Harry Thomas" wrote in message
...
I have two tables, TableA and TableB. In a form I use a combo Box to

select
data from Field1 in TableA and place it in Field2 in TableB. What is the
exact command I put in the AfterUpdate field of the combo box to also take
data from Field3 of TableA and place it in Field4 of TableB.

Thank you


  #4  
Old January 4th, 2006, 02:26 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default Combo Box AfterUpdate Help

Dodgy design as already pointed out in "Updating....." thread yesterday.

I think you will find most people will consider your design flawed.

Anyway use the Column property of the ComboBox as already stated yesterday.

I am hesitant to help you make an arse out of your database however in the
AfterUpdate event procedure of the ComboBox do something like this:

Me!FieldB4 = Me!cboFieldA1.Column(1)

This assumes that cboFieldA1 is bound to FieldA1 and that FieldA3 is the
next column.

In this case with the correct design you would not need any code if the
value of FieldA1 was the primary key of the table being referenced and
FieldB4 was the foreign key in the related table.

I speak from 25 years of experience with Relational Databases and nearly 15
with Access/Jet.

I would strongly recommend you redesign your database conforming to the
relational model rather than the big buckets of merde approach.

This last sentence is the one that is of most help to you although you may
not realise it.


--
Slainte

Craig Alexander Morrison
Crawbridge Data (Scotland) Limited

"Harry Thomas" wrote in message
...
I have two tables, TableA and TableB. In a form I use a combo Box to select
data from Field1 in TableA and place it in Field2 in TableB. What is the
exact command I put in the AfterUpdate field of the combo box to also take
data from Field3 of TableA and place it in Field4 of TableB.

Thank you





  #5  
Old January 4th, 2006, 02:57 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default Combo Box AfterUpdate Help

I asked a question and expected a reasonable answer, if I wanted a lecture on
database design I would have asked for that instead. You have no idea of the
design, the examples I gave yesterday and today were purely to get an answer
to a question. So unless you want to make an arse of yourself, read the
question.

"Craig Alexander Morrison" wrote:

Dodgy design as already pointed out in "Updating....." thread yesterday.

I think you will find most people will consider your design flawed.

Anyway use the Column property of the ComboBox as already stated yesterday.

I am hesitant to help you make an arse out of your database however in the
AfterUpdate event procedure of the ComboBox do something like this:

Me!FieldB4 = Me!cboFieldA1.Column(1)

This assumes that cboFieldA1 is bound to FieldA1 and that FieldA3 is the
next column.

In this case with the correct design you would not need any code if the
value of FieldA1 was the primary key of the table being referenced and
FieldB4 was the foreign key in the related table.

I speak from 25 years of experience with Relational Databases and nearly 15
with Access/Jet.

I would strongly recommend you redesign your database conforming to the
relational model rather than the big buckets of merde approach.

This last sentence is the one that is of most help to you although you may
not realise it.


--
Slainte

Craig Alexander Morrison
Crawbridge Data (Scotland) Limited

"Harry Thomas" wrote in message
...
I have two tables, TableA and TableB. In a form I use a combo Box to select
data from Field1 in TableA and place it in Field2 in TableB. What is the
exact command I put in the AfterUpdate field of the combo box to also take
data from Field3 of TableA and place it in Field4 of TableB.

Thank you






  #6  
Old January 4th, 2006, 03:10 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default Combo Box AfterUpdate Help

Hey Harry, "way to go" to get more help!

TC

  #7  
Old January 4th, 2006, 03:22 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default Combo Box AfterUpdate Help

Read the answer!

"Me!FieldB4 = Me!cboFieldA1.Column(1)

As well as the advice on how to do it correctly the bish-bash-bodge-up code
has also been posted.

--
Slainte

Craig Alexander Morrison
Crawbridge Data (Scotland) Limited

"Harry Thomas" wrote in message
news
I asked a question and expected a reasonable answer, if I wanted a lecture
on
database design I would have asked for that instead. You have no idea of
the
design, the examples I gave yesterday and today were purely to get an
answer
to a question. So unless you want to make an arse of yourself, read the
question.

"Craig Alexander Morrison" wrote:

Dodgy design as already pointed out in "Updating....." thread yesterday.

I think you will find most people will consider your design flawed.

Anyway use the Column property of the ComboBox as already stated
yesterday.

I am hesitant to help you make an arse out of your database however in
the
AfterUpdate event procedure of the ComboBox do something like this:

Me!FieldB4 = Me!cboFieldA1.Column(1)

This assumes that cboFieldA1 is bound to FieldA1 and that FieldA3 is the
next column.

In this case with the correct design you would not need any code if the
value of FieldA1 was the primary key of the table being referenced and
FieldB4 was the foreign key in the related table.

I speak from 25 years of experience with Relational Databases and nearly
15
with Access/Jet.

I would strongly recommend you redesign your database conforming to the
relational model rather than the big buckets of merde approach.

This last sentence is the one that is of most help to you although you
may
not realise it.


--
Slainte

Craig Alexander Morrison
Crawbridge Data (Scotland) Limited

"Harry Thomas" wrote in message
...
I have two tables, TableA and TableB. In a form I use a combo Box to
select
data from Field1 in TableA and place it in Field2 in TableB. What is
the
exact command I put in the AfterUpdate field of the combo box to also
take
data from Field3 of TableA and place it in Field4 of TableB.

Thank you








  #8  
Old January 4th, 2006, 03:31 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default Combo Box AfterUpdate Help

BTW If you come to the Tables and Database Design newsgroup it is your
tables and database design that are going to be looked at.

You may wish to use Getting Started or Forms in future if you are hoping for
no-one to notice what a possibly bad database design you have.

Relational Databases store information once only and in the original thread
we discussed that with you, you chose to ignore it, that's your perogative I
can't force you nobody can but just know this - a good relational database
design is rewarded in ease of development when using Access as the
application development tool.

Tell me why your design requires the data duplication that you believe it
does. (excluding point-in-time data that was mentioned in the earlier
thread)

You state I have no idea of your design, come on enlighten us about your
design, prove my assumptions wrong, you never know they may be.

--
Slainte

Craig Alexander Morrison
Crawbridge Data (Scotland) Limited

"Harry Thomas" wrote in message
news
I asked a question and expected a reasonable answer, if I wanted a lecture
on
database design I would have asked for that instead. You have no idea of
the
design, the examples I gave yesterday and today were purely to get an
answer
to a question. So unless you want to make an arse of yourself, read the
question.

"Craig Alexander Morrison" wrote:

Dodgy design as already pointed out in "Updating....." thread yesterday.

I think you will find most people will consider your design flawed.

Anyway use the Column property of the ComboBox as already stated
yesterday.

I am hesitant to help you make an arse out of your database however in
the
AfterUpdate event procedure of the ComboBox do something like this:

Me!FieldB4 = Me!cboFieldA1.Column(1)

This assumes that cboFieldA1 is bound to FieldA1 and that FieldA3 is the
next column.

In this case with the correct design you would not need any code if the
value of FieldA1 was the primary key of the table being referenced and
FieldB4 was the foreign key in the related table.

I speak from 25 years of experience with Relational Databases and nearly
15
with Access/Jet.

I would strongly recommend you redesign your database conforming to the
relational model rather than the big buckets of merde approach.

This last sentence is the one that is of most help to you although you
may
not realise it.


--
Slainte

Craig Alexander Morrison
Crawbridge Data (Scotland) Limited

"Harry Thomas" wrote in message
...
I have two tables, TableA and TableB. In a form I use a combo Box to
select
data from Field1 in TableA and place it in Field2 in TableB. What is
the
exact command I put in the AfterUpdate field of the combo box to also
take
data from Field3 of TableA and place it in Field4 of TableB.

Thank you








  #9  
Old January 4th, 2006, 03:40 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default Combo Box AfterUpdate Help

Relax Harry.
1) you got a working answer (you didn't reply to my suggestion)
2) you got several consistent opinions on "tablesdbdesign".

If you had a gun and asked how to take the safety off so you could shoot
yourself in the foot, I would expect you would be advised to leave the
safety on. I didn't see anywhere in your posts that suggested a good reason
for shooting yourself in the foot.
--
Duane Hookom
MS Access MVP
--

"Harry Thomas" wrote in message
news
I asked a question and expected a reasonable answer, if I wanted a lecture
on
database design I would have asked for that instead. You have no idea of
the
design, the examples I gave yesterday and today were purely to get an
answer
to a question. So unless you want to make an arse of yourself, read the
question.

"Craig Alexander Morrison" wrote:

Dodgy design as already pointed out in "Updating....." thread yesterday.

I think you will find most people will consider your design flawed.

Anyway use the Column property of the ComboBox as already stated
yesterday.

I am hesitant to help you make an arse out of your database however in
the
AfterUpdate event procedure of the ComboBox do something like this:

Me!FieldB4 = Me!cboFieldA1.Column(1)

This assumes that cboFieldA1 is bound to FieldA1 and that FieldA3 is the
next column.

In this case with the correct design you would not need any code if the
value of FieldA1 was the primary key of the table being referenced and
FieldB4 was the foreign key in the related table.

I speak from 25 years of experience with Relational Databases and nearly
15
with Access/Jet.

I would strongly recommend you redesign your database conforming to the
relational model rather than the big buckets of merde approach.

This last sentence is the one that is of most help to you although you
may
not realise it.


--
Slainte

Craig Alexander Morrison
Crawbridge Data (Scotland) Limited

"Harry Thomas" wrote in message
...
I have two tables, TableA and TableB. In a form I use a combo Box to
select
data from Field1 in TableA and place it in Field2 in TableB. What is
the
exact command I put in the AfterUpdate field of the combo box to also
take
data from Field3 of TableA and place it in Field4 of TableB.

Thank you








  #10  
Old January 4th, 2006, 03:48 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default Combo Box AfterUpdate Help

It never ceases to amaze me how people who are asking for FREE help can be
so demanding. No one here is required to answer your question, and I
suspect at least half a dozen people here will never do so again.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/...UBED1=ACCESS-L


"Harry Thomas" wrote in message
news
I asked a question and expected a reasonable answer, if I wanted a lecture
on
database design I would have asked for that instead. You have no idea of

the
design, the examples I gave yesterday and today were purely to get an

answer
to a question. So unless you want to make an arse of yourself, read the
question.

"Craig Alexander Morrison" wrote:

Dodgy design as already pointed out in "Updating....." thread yesterday.

I think you will find most people will consider your design flawed.

Anyway use the Column property of the ComboBox as already stated

yesterday.

I am hesitant to help you make an arse out of your database however in

the
AfterUpdate event procedure of the ComboBox do something like this:

Me!FieldB4 = Me!cboFieldA1.Column(1)

This assumes that cboFieldA1 is bound to FieldA1 and that FieldA3 is the
next column.

In this case with the correct design you would not need any code if the
value of FieldA1 was the primary key of the table being referenced and
FieldB4 was the foreign key in the related table.

I speak from 25 years of experience with Relational Databases and nearly

15
with Access/Jet.

I would strongly recommend you redesign your database conforming to the
relational model rather than the big buckets of merde approach.

This last sentence is the one that is of most help to you although you

may
not realise it.


--
Slainte

Craig Alexander Morrison
Crawbridge Data (Scotland) Limited

"Harry Thomas" wrote in message
...
I have two tables, TableA and TableB. In a form I use a combo Box to

select
data from Field1 in TableA and place it in Field2 in TableB. What is

the
exact command I put in the AfterUpdate field of the combo box to also

take
data from Field3 of TableA and place it in Field4 of TableB.

Thank you








 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Hidden Power of the Combo Box JethroUK© New Users 2 October 24th, 2005 09:18 AM
Show controls when value is selected in combo box jped Using Forms 12 August 23rd, 2005 11:35 PM
Combo used for Find does not trigger AfterUpdate Event Pat Garard General Discussion 3 June 14th, 2005 06:43 AM
Display column 4 in combo box AfterUpdate Bradley C. Hammerstrom New Users 2 May 27th, 2004 06:29 PM
Requery Combobox MJ Running & Setting Up Queries 7 May 25th, 2004 11:01 AM


All times are GMT +1. The time now is 02:09 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.