How do I automatically get access to put two field together

kasey217

New Member
Joined
Jun 18, 2003
Messages
30
Here is my dilema. I have a database that has account numbers and I would like to be able to have a name assoicated with that account number so when I key it into the transactions the account name with automatically come up. How do I do that? Thank you in advance. I am just learning Access so I am having a time... :confused:
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Re: How do I automatically get access to put two field toget

Hi Kasay,

How are you entering this data? Into a single form? Or a datasheet (a list of records)?

Either way, you will need a table that relates account names to numbers, then in a query you can look up the name based on the account number entered.

For example, say you have a single form bound to a table. Instead, create a query that has all the fields of the table, then join in the table that relates account numbers to account names and add that field to the query. Then add a control to the form that is bound to this looked up value. You could also use a 2 column combobox and make the rowsource of the combo the table that relates numbers to names. Make the column count 2, with the column widths set to 0". Have the rowsource with criteria that comes from a control you data enter on the form, and when this control is updated, requery the combo.

Hope this helps,
 
Upvote 0
Re: How do I automatically get access to put two field toget

What I want to do is get an account number to automatically fill in linking to the account type. So when I enter the account type in it will fill in the account number. I am in a table.

It is a single table. There are 4 tables all together.
 
Upvote 0
Re: How do I automatically get access to put two field toget

Following on from Corticus' post, you might want to have a look at using a form to enter your data - there are some good articles on using forms on the MS website here and here

HTH, Andrew. :)
 
Upvote 0
Re: How do I automatically get access to put two field toget

Thank you,
I am using forms but it still makes me put the account number and account type in. I don't know what I am doing wrong. Thanks for all your help too.
 
Upvote 0
Re: How do I automatically get access to put two field toget

Somehow, you're going to have to use a query to look up the account name based on the number you enter. To do this, you could either bind a form to a query with a criteria set to the account number entered, or through a control, such as a combo that employs an SQL expression as it's rowsource. You could also you ADO to run a dynamic query in your code, using the textbox that receives the account number as your criteria, and then return whatever the query returns to a control of your choice on your form.
 
Upvote 0

Forum statistics

Threads
1,221,831
Messages
6,162,242
Members
451,756
Latest member
tommyw

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