Working with Tabs and Subforms

Q

Question Boy

I have a form which as a Tab with multiple pages and each page, with the
exception of the first one, has a subform on it.

Currently, when I goto a new record all the subform appears and the user
can enter data, but since the first page hasn't been filled out an actual ID
has not been created and thus the subform data is unassociated. How can I
setup the tabs/page/subform not to appear or accept data until a record in
the main form is actually created first?

Thank you,

QB
 
D

Damon Heron

The tabs have a control, called by Access tabctl1 or similar. In the change
event of the tabctl, which is zero-based, you can add an if then statement
like this,
If Me.txtMsg = "" Then
Me.TabCtl1.Value = 0
Exit Sub
End If
'continue on to next tab if condition false - and add any code needed.

In this one, I am testing for the condition of a textbox, but you can use
any condition you want.

Damon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top