Specific Table info to a form

HowardChr

Noob
Local time
Today, 10:58
Joined
Apr 26, 2007
Messages
35
This may be a bit detailed, so stick with me. Is there a way to have a form which you can pull tabel information into, but look at a specific line? I am trying to create a database that will pull up the first line of a specific tabel's information, then when a command button is pressed, it will pull up a seperate form with the information from line 2 of that SAME tabel. I don't want this to be done by clicking the arrows at the bottom of the form. I actually want this to populate seperately.

Lets say I have a Loc_ID box that is pulling the Loc_ID from a tabel.
The tabel I am trying to pull from has an autonumber format and is sorted in that manor from a-z. Is there a certain type of logic that I should use however? As of now, each time I have a form come up, it starts at the first record, which is not what I want it to do. I want it to come up with the first record, then click a few buttons, then the next time a new form comes up with the same info on it, I want it to show the second record's information.

Any information anyone might have will be MOST helpfull! :D
 
First of all, tables are not stored in any particular order. I'm going to borrow a statement from The_Doc_Man from another post:
The_Doc_Man said:
ALL databases are based on set theory. In the theoretical case, when you do something to the members of the set, you do it to all of them - with no statement of ordering. That is, in theory, everything that happens to set members MIGHT AS WELL happen in parallel without regard to order because set theory doesn't include the word "ordered." It is an artifact of presentation. Which is why neileg suggested the query.

A query includes the syntax for "ORDER BY" to assert a particular order. A table, which is a SET (hint, hint) of records, has no true order. If you open the table and click on one of the fields to sort it, you sort the PRESENTATION of the table ON YOUR SCREEN. It is like you created a virtual query that is the equivalent of SELECT * FROM MYTABLE ORDER BY {whatever was last clicked in the field list}; If you save that, you DON'T SAVE THE TABLE. You save the presentation information.

Never ever presume anything to do with order when working directly with tables. That order doesn't truly exist.

...there is no order to a table - with one exception. If you declare a proper prime key (i.e. unique) and immediately compact the database, all tables having prime keys are re-sorted into the natural order of their prime keys. HOWEVER... even one little insertion can break up this ordering again. Physically, the new record will probably just get tacked onto the logical "tail end" of the table regardless of the order.

So, how do you define the "first line" of your table, since there is no inherent order?
 
So, how do you define the "first line" of your table, since there is no inherent order?

Let me give some backround here. I am creating a product that a user will set up ONE time for different locations. The order in which they put in the locations is what I would like the order to come up as the program proceeds. The autonumber was just put in place so that when a location is added to the table, it would be the "next" location 1,2,3,etc...
 
It does sound like a normalisation problem to me. But you could insert a sorting field to ensure your records are in the correct order.
 

Users who are viewing this thread

Back
Top Bottom