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 » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Auto Add Data



 
 
Thread Tools Display Modes
  #1  
Old January 31st, 2006, 07:06 AM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Auto Add Data

Hi

I run Win2k with Access 2k. I have posted this question a couple of times
and although people have tried to help me I just dont get it. This is my
problem;

I have a table called "Colours"

In column 1 (called Code) I have a unique number ie EX90028-D
In column 2 (called Colours) I have a colour ie Green

EXAMPLE:

Column 1 Column 2

Code Colour
EX90028-D GREEN
EX90029-D RED
EX90030-D BLUE

Colum 1 is designated the primary key

I have a query called Colours which includes both Column 1 and Column 2

I want to create a form that has a Combo box that lists the Codes and a text
box that automatically lists the corresponding colour to which ever code is
selcted in the Combo box.


I apologise for any inconvienence that I have put people through with this
issue. Would it be possible for anyone to email me and example of this so
that I could work it out along with any explanation that is given to me?

My email addess is

Thank You

John

  #2  
Old January 31st, 2006, 01:29 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Auto Add Data

Your combo box should have these properties:
Name: cboCodeColour
Row Source:
SELECT Code, Colour
FROM Colours
Order By Code;
Column Count: 2
Bound Column: 1
Column Widths: 1,0

Add a text box to your form and set its control source to:
=cboCodeColour!Column(1)

--
Duane Hookom
MS Access MVP
--

"John Calder" wrote in message
...
Hi

I run Win2k with Access 2k. I have posted this question a couple of times
and although people have tried to help me I just dont get it. This is my
problem;

I have a table called "Colours"

In column 1 (called Code) I have a unique number ie EX90028-D
In column 2 (called Colours) I have a colour ie Green

EXAMPLE:

Column 1 Column 2

Code Colour
EX90028-D GREEN
EX90029-D RED
EX90030-D BLUE

Colum 1 is designated the primary key

I have a query called Colours which includes both Column 1 and Column 2

I want to create a form that has a Combo box that lists the Codes and a
text
box that automatically lists the corresponding colour to which ever code
is
selcted in the Combo box.


I apologise for any inconvienence that I have put people through with this
issue. Would it be possible for anyone to email me and example of this so
that I could work it out along with any explanation that is given to me?

My email addess is

Thank You

John



  #3  
Old January 31st, 2006, 01:39 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Auto Add Data

John

Your form has two fields, a combo box and a text box.

Your combo box is based on a query that returns two columns, the Code and
the Colour.

In your combo box's AfterUpdate event you add an expression something like:

Me!YourTextBoxName = Me!YourComboBoxName.Column(1)

This will put the Colour in the textbox after you select a Code.

Now, why do you want to keep the Code displayed? If you actual, eventual
aim is to let people pick an actual Colour, then you can do it in a single
combo box.

Use the Column Width property of the combo box and set it to something like:

0;1

This stores the Code, but displays the Colour. And it has the advantage of
allowing the user to select by the name of the Colour, rather than by some
hard-to-remember Code.

--
Regards

Jeff Boyce
Office/Access MVP

"John Calder" wrote in message
...
Hi

I run Win2k with Access 2k. I have posted this question a couple of times
and although people have tried to help me I just dont get it. This is my
problem;

I have a table called "Colours"

In column 1 (called Code) I have a unique number ie EX90028-D
In column 2 (called Colours) I have a colour ie Green

EXAMPLE:

Column 1 Column 2

Code Colour
EX90028-D GREEN
EX90029-D RED
EX90030-D BLUE

Colum 1 is designated the primary key

I have a query called Colours which includes both Column 1 and Column 2

I want to create a form that has a Combo box that lists the Codes and a

text
box that automatically lists the corresponding colour to which ever code

is
selcted in the Combo box.


I apologise for any inconvienence that I have put people through with this
issue. Would it be possible for anyone to email me and example of this so
that I could work it out along with any explanation that is given to me?

My email addess is

Thank You

John


  #4  
Old January 31st, 2006, 02:25 PM
Bob Miller Bob Miller is offline
Senior Member
 
First recorded activity by OfficeFrustration: May 2005
Posts: 358
Default

With the form in Design view, make sure the Controls Wizard is active (the button on the Controls Toolbar with the magic wand.)
Select the ComboBox control, move the cursor to where you want it on your form and left click once. You will be stepped through the creation of you Combobox.

Quote:
Originally Posted by John Calder
Hi

I run Win2k with Access 2k. I have posted this question a couple of times
and although people have tried to help me I just dont get it. This is my
problem;

I have a table called "Colours"

In column 1 (called Code) I have a unique number ie EX90028-D
In column 2 (called Colours) I have a colour ie Green

EXAMPLE:

Column 1 Column 2

Code Colour
EX90028-D GREEN
EX90029-D RED
EX90030-D BLUE

Colum 1 is designated the primary key

I have a query called Colours which includes both Column 1 and Column 2

I want to create a form that has a Combo box that lists the Codes and a text
box that automatically lists the corresponding colour to which ever code is
selcted in the Combo box.


I apologise for any inconvienence that I have put people through with this
issue. Would it be possible for anyone to email me and example of this so
that I could work it out along with any explanation that is given to me?

My email addess is

Thank You

John
  #5  
Old January 31st, 2006, 08:04 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Auto Add Data

Thanks for all your help.

Jeff, I work in the Painted Steel industry so the reason I have the opted
for the code to retain itself and the colour to display automatically is that
this database is being designed for production employees that are very
familiar with "paint codes" (of which there are over 900). There may be 5 or
6 entries during a shift that has the same code and colour but the rest of
the information (which I will add to the database) may change 4 or 5 times.
It is just to save the user from re-entering the code & colour every single
time they have an entry. Hope this helps you understand my reasons for doing
this way.

Thanks again



"Jeff Boyce" wrote:

John

Your form has two fields, a combo box and a text box.

Your combo box is based on a query that returns two columns, the Code and
the Colour.

In your combo box's AfterUpdate event you add an expression something like:

Me!YourTextBoxName = Me!YourComboBoxName.Column(1)

This will put the Colour in the textbox after you select a Code.

Now, why do you want to keep the Code displayed? If you actual, eventual
aim is to let people pick an actual Colour, then you can do it in a single
combo box.

Use the Column Width property of the combo box and set it to something like:

0;1

This stores the Code, but displays the Colour. And it has the advantage of
allowing the user to select by the name of the Colour, rather than by some
hard-to-remember Code.

--
Regards

Jeff Boyce
Office/Access MVP

"John Calder" wrote in message
...
Hi

I run Win2k with Access 2k. I have posted this question a couple of times
and although people have tried to help me I just dont get it. This is my
problem;

I have a table called "Colours"

In column 1 (called Code) I have a unique number ie EX90028-D
In column 2 (called Colours) I have a colour ie Green

EXAMPLE:

Column 1 Column 2

Code Colour
EX90028-D GREEN
EX90029-D RED
EX90030-D BLUE

Colum 1 is designated the primary key

I have a query called Colours which includes both Column 1 and Column 2

I want to create a form that has a Combo box that lists the Codes and a

text
box that automatically lists the corresponding colour to which ever code

is
selcted in the Combo box.


I apologise for any inconvienence that I have put people through with this
issue. Would it be possible for anyone to email me and example of this so
that I could work it out along with any explanation that is given to me?

My email addess is

Thank You

John



  #6  
Old February 1st, 2006, 01:17 PM posted to microsoft.public.access.gettingstarted
external usenet poster
 
Posts: n/a
Default Auto Add Data

Thanks for the further explanation, John.

It was only a thought, and it sounds like your setup works in your
situation.

Regards

Jeff Boyce
Office/Access MVP

"John Calder" wrote in message
...
Thanks for all your help.

Jeff, I work in the Painted Steel industry so the reason I have the opted
for the code to retain itself and the colour to display automatically is

that
this database is being designed for production employees that are very
familiar with "paint codes" (of which there are over 900). There may be 5

or
6 entries during a shift that has the same code and colour but the rest of
the information (which I will add to the database) may change 4 or 5

times.
It is just to save the user from re-entering the code & colour every

single
time they have an entry. Hope this helps you understand my reasons for

doing
this way.

Thanks again



"Jeff Boyce" wrote:

John

Your form has two fields, a combo box and a text box.

Your combo box is based on a query that returns two columns, the Code

and
the Colour.

In your combo box's AfterUpdate event you add an expression something

like:

Me!YourTextBoxName = Me!YourComboBoxName.Column(1)

This will put the Colour in the textbox after you select a Code.

Now, why do you want to keep the Code displayed? If you actual,

eventual
aim is to let people pick an actual Colour, then you can do it in a

single
combo box.

Use the Column Width property of the combo box and set it to something

like:

0;1

This stores the Code, but displays the Colour. And it has the advantage

of
allowing the user to select by the name of the Colour, rather than by

some
hard-to-remember Code.

--
Regards

Jeff Boyce
Office/Access MVP

"John Calder" wrote in message
...
Hi

I run Win2k with Access 2k. I have posted this question a couple of

times
and although people have tried to help me I just dont get it. This is

my
problem;

I have a table called "Colours"

In column 1 (called Code) I have a unique number ie EX90028-D
In column 2 (called Colours) I have a colour ie Green

EXAMPLE:

Column 1 Column 2

Code Colour
EX90028-D GREEN
EX90029-D RED
EX90030-D BLUE

Colum 1 is designated the primary key

I have a query called Colours which includes both Column 1 and Column

2

I want to create a form that has a Combo box that lists the Codes and

a
text
box that automatically lists the corresponding colour to which ever

code
is
selcted in the Combo box.


I apologise for any inconvienence that I have put people through with

this
issue. Would it be possible for anyone to email me and example of this

so
that I could work it out along with any explanation that is given to

me?

My email addess is

Thank You

John




 




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
Cross program data sharing m_jurrens Powerpoint 1 December 16th, 2005 04:36 PM
PST file has reached maximum size Jeff C General Discussion 2 October 6th, 2005 01:35 PM
strategy for data entry in multiple tables LAF Using Forms 18 April 25th, 2005 04:04 AM
VBA Code problem error 9 Speedy General Discussion 19 October 15th, 2004 09:05 PM
How to create graphs in a monthly report where the base data can change John Clarke Charts and Charting 3 June 25th, 2004 02:22 AM


All times are GMT +1. The time now is 09:59 PM.


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