Linking a textbox to a cell

asu81

Registered User.
Local time
Today, 04:12
Joined
May 26, 2012
Messages
47
Hi!
I don't understand how to work with textboxes.

I would like a textbox to show values from a table on a specific column, but with a rowsource decided by 2 comboboxes. The problem is that I can't find a rowsource property for the textbox. How are text boxes of any use if I only can specify column name, and not which row to link to? Specifying a cell requires both column and row, right?

I'm sure I've misunderstood something here, so please enlighten me! :)
Thanks!
 
Therer are no cells in Access. Therer are rows which are records that contain multiple columns called fields.

If you wish to extract data from a table, the easiest way is to use a query. In the query, you specify specific criteria for fields.

Suggest you read this white paper on differences and then look at the second resource for information on Queries.

http://forums.aspfree.com/microsoft-access-help-18/access-vs-excel-349267.html

http://office.microsoft.com/en-us/access-help/examples-of-query-criteria-HA010066611.aspx

If you are using your form and text box as a search field, then you should make your record source for your text box your query.
 
It sounds as if you have come to Access from an Excel background.

The first thing you are going to need to do (and this will be very hard at first) is forget everything you know about Excel. From there the first thing you will need to get your head around in a hurry is the concept of Data Normalisation. To aid you in this process you might find this tutorial helpful.

As a starter when you think Row in Excel think Record in Access. When you think Column in Excel think Field in Access.

So a from will typically show one record at a time, so a Form Field by it's nature does not have a Row Source (that is a Combo/list box term) a field simply has a Control Source.
 
Thanks for your quick replies both of you!

I'm familiar with queries. The reason I use a text box is that I would like to both show the existing data in the record, but also be able to edit it.

Is it not possible to link a text box to a specific record? In that case, what are text boxes for?
 
Text boxes are bound to specific fields in either queries or tables. (Additionally, there are unbound textboxes used for lookups and calculations among other things.) If you want a text box to reveal a particular field in a particular record, you would need to provide in your form a unique identifier in another text box. Often a table has this unique identifer for this such purpose.

Text boxes are used to enter data into a table. They can also be used to provide data in a table, but usually, they display all the data in the record using multiple text boxes.

You may wish to include a search box on your form to hunt for a specific record. This tutorial may help in that matter.

http://www.datapigtechnologies.com/flashfiles/searchform.html



Alan
 
You may wish to include a search box on your form to hunt for a specific record.
Alan


My idea was to provide the identifier by choosing projectNo and employeeNo from two combo boxes. Would that work? In that case how? :)

EDIT: The table has a projectNo field, a employeeNo field and lots of more fields relating to what that employee have done in the particular project. There may be many records with the same projectNo, but with different employeeNo.
 
Last edited:
No, it would only display it. If you wanted to edit it, you would need to use the Double Click (or other event) to open a Pop-up form to edit the underlying record.
 

Users who are viewing this thread

Back
Top Bottom