Link to home
Start Free TrialLog in
Avatar of Jass Saini
Jass Saini

asked on

Locking the first record on the form

I want to lock the first record that shows up on my form as that is my running tab for the other records
Avatar of PatHartman
PatHartman
Flag of United States of America image

You would need to use a form with two subforms to make this visual.  Keep in mind that you are not working with a spreadsheet any more where any row can be anything and they don't have to all be a same.  In a relational database, all rows of a recordset are equal and identical in format.  You can't "freeze" one at the top of a form.  If you require logic like this, it is most likely because your tables are improperly normalized.  Can you give us more information.
JAss SAini,

Yes, I too am confused,...
How is your table designed so that this arrangement is required?

Or better yet, ...post a simple example of the first record and the second record...

I am not sure I understand the reason for this rather unique request

JeffCoachman
Avatar of Jass Saini
Jass Saini

ASKER

Hello Pat,

My table is normalized and I know that I am not working with spreadsheets..Thank You!  

My first is based off my query...  Allocating funds to different programs...

My second record (New record) is where the analyst will show their inputs.  

When I checked the first is editable...and I know this should be the case for the fields..
ASKER CERTIFIED SOLUTION
Avatar of Gustav Brock
Gustav Brock
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank You Gustav...
Record 1 does not belong in the same table as the subsequent records if what you are saying is that record 1 is a summary of the subsequent records.  This should be broken into two tables.

PS - although gustav's solution will probably work if your users are not inclined to alter the sorts of subforms, if the user does sorts the recordset, you will be able to update any record that is not the first.  And that means that if the "first" record ends up not first due to sorting, the user will be able to edit it.

If there is some identifier in the record that identifies the "first" record, then you can use my two subform solution so that the first subform shows the parent record and the second subform shows the details.  This is not right in the pure sense but it will solve the problem without requiring you to create a second table.
Thank You
I don't expect any points because I didn't provide a Band-Aid solution to an improper design, but just be aware that your users will be able to update the "first" record if they sort the subform.
Thanks Pat for the heads up...Just to let you know I did change my table...I just need to read more on normalization.  i don't think anyone here is an expert at Access..so a lot of us are learning as we go.
Good move.  It is always better to get the schema straight in the beginning.