Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subform Rows

Status
Not open for further replies.

Bigsteve42

Technical User
Nov 12, 2002
13
GB
Could someone please tell me how I can get a subform on a main form to open with a minimum of 2 rows showing. Still need the subform to add more lines after the 1st two rows have been completed.

Many thanks
 
[tt]
Hi:

Not a lot of information to go on...

Assuming that "one row" means one record in a "Continuous Forms" display, then

If your form property Data Entry is "Yes" then you wouldn't get more than one row.

If you have only one record in the underlying table or query, you wouldn't get more than one row.

If you are running a macro or code to go to the "Last" record, you'd display only one row.

I hope this is helpful.
Gus Brunston [glasses] An old PICKer, using Access2000
[tt]Want solutions you can understand?
Post understandable questions.
[/tt]
 
Hi Gus

Sorry the question was a bit vague. The subform is to be used for data entry and the user must enter two records for each entry (is a journal entry form, line = debits, line 2 = credits). I know when they enter the 1st line the next line will automatically appear but want to make it clear that 2 entries are required. I assume from your reply that this is not possible if it is a data entry form. If the form is not set to data entry can it be done?

Cheers

Steve
 
Hi Steve:

(All others, probably with more experience than I have in this area, are most welcome to butt in here...)

If the form is set "Data Entry, Yes", it will display a blank record, and when the user tabs (enters) out of that record, it will leave it displayed and show the focus in a blank record for the next entry. I don't know how to show a blank line, but I think there are several ways to force a balancing entry.

Are debits and credits in the same table? Then you could assign debits and credits in the same record.

You might want to calculate totals for debits and credits for any particular data entry session and prohibit closing the form until the totals are equal...or better, after the update of every 2nd record, test for balance, and ring a bell, blow a whistle, and show a message box if the debits and credits are not in balance.

If you have split debits and/or credits (among different accounting codes) then you would have to go further than testing just after every 2nd record.

I'll check back,







Gus Brunston [glasses] An old PICKer, using Access2000
[tt]Want solutions you can understand?
Post understandable questions.
[/tt]
 
Hi Gus

I have written validation rules for the balancing of the total debits and credits and it works OK, just thought I could open up the form and have 2 blank lines just to be sure the user understands 2 entries are required. It won't matter if it can't be done.

Thanks for your help

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top