Retain data in form header between records

lipin

Registered User.
Local time
Today, 09:01
Joined
May 21, 2002
Messages
149
Is there a way to have the textboxes in a form header not change between entering records, they will be the same for each record and usually only change on a weekly basis. Basically have the textbox equal whatever was entered first for all entries that follow.
Thanks.
 
Maybe you could do something where after you enter data into the header fields that you want to keep, you click a button that sets the DefaultValue property of the field to whatever you have in it. Then you could have another button that would clear it out.
 
I tried the following statement in the AfterUpdate event of my txtbox [weekly class] but then when I go to the next record on the form, it clears out.

[weekly class].DefaultValue = [weekly class].Value

Any suggestions?
 
Can you put it in your code where you add a new record, that way it will only run when a value is submitted.

This way when you put the date in the txt box once, then when you click a button to add the record it changes the default value of the textbox to the date you entered, then, if you should want to change that date, all you have to do is change it and the default value will change again when you add that record.

Not sure I'm being extremely clear, hope that helps
 
lipin said:
Is there a way to have the textboxes in a form header not change between entering records, they will be the same for each record and usually only change on a weekly basis. Basically have the textbox equal whatever was entered first for all entries that follow.
Thanks.

Use two tables. Table 1 would be the text boxes in the form header that don't change often plus an ID field. Table 2 would be the other fields related to table one. Have the unique ID field in table 1 point to a field in table 2 to relate the two tables.

The fields in table one would be the top text fields in the parent form. The fields in table 2 would be on a subform.

Ex:
[tblOne] Fields
UniqueID
Date

[tblTwo] Fields
SubID = Unique ID for records in this table
tblOneID = [tblOne].[UniqueID]
Sub1 = Data in the sub form
Sub2
Sub3

I hpe this make some sense. :rolleyes:
 

Users who are viewing this thread

Back
Top Bottom