Row Source Type

chobo321321

Registered User.
Local time
Yesterday, 19:29
Joined
Dec 19, 2004
Messages
53
Hi, I'm trying to figure out what exactly is the difference between the following:

Row Source Type:
- Table/Query
- Field List
- Value List

I know it may sound like a stupid question, but I could not find any useful information on this anywhere. I'm trying to make a simple database, and I want to have a listbox for some of the fields, but I'm not sure which one I should use for the rowsource. Any help is appreciated. Also, if there any quirks with programming that are associated with choosing any of the three please let me know. Access can be a real pain in the ass :)
 
To see the help entry for RowSource, click into the property and press F1. Let me see if I can make the options clearer than the help entry.

The three options tell Access what to do with the RowSource property. With the Table/Query and Field List options you will need to place the name of a table or query or an entire SQL string in the RowSource.
-The Table/Query option will return the designated recordset - ie the rows and columns specified by the query or an entire table. This is the most frequent choice since it allows the options to be maintained by the user without programmer intervention.
-The FieldList option will return a list of the fields in the RowSource's table or query. This option would only be used if you wanted to create your own form or report generator for the user. Or if you wanted to create some kind of documentation tool.
-The ValueList option allows you to type in your own list of values. It is most frequently used when the set of choices is small and unlikely to change such as Male, Female, Unspecified.

The fourth possibility, a user written function, is way too complicated to discuss here. The function would need to be written to strict specifications so that VBA can interact with it to properly populate the list. This method might be used by an advanced programmer to obtain values that can't be gotten directly from a table or query and that are not static enough to be coded as a ValueList.
 
Thanks for the help. I was mainly confused on the fileld vs value list, but it makes sense now. Thanks :)
 

Users who are viewing this thread

Back
Top Bottom