subform

  • Thread starter alxw3 via AccessMonster.com
  • Start date
A

alxw3 via AccessMonster.com

I have a button on my access 2003 main form. Like to click on the button and
display the active record on my subform and also display subform's total
number of records. how?.
 
A

Arvin Meyer MVP

How do you want to display the subform record?

The form's total number of records can be displayed in a text box by setting
its controlsource:

=IIf([NewRecord],"New Record",[CurrentRecord] & " of " & Count(*))
 
A

alxw3 via AccessMonster.com

Just a pop up message box that displays the first and second fields of the
active record in the subform. Interested in subform's total number of records.

How do you want to display the subform record?

The form's total number of records can be displayed in a text box by setting
its controlsource:

=IIf([NewRecord],"New Record",[CurrentRecord] & " of " & Count(*))
I have a button on my access 2003 main form. Like to click on the button
and
display the active record on my subform and also display subform's total
number of records. how?.
 
A

Arvin Meyer MVP

alxw3 via AccessMonster.com said:
Just a pop up message box that displays the first and second fields of the
active record in the subform. Interested in subform's total number of
records.

Use the expression I gave you below in the subform's header or footer. If it
is a datasheet subform, you'll need to add another textbox to the main form
and set its controlsource to:

= Forms!FormName!SubformControlName.Form![Name of control in subform footer]

The message box code would read:

Sub Form_Current()
MsgBox Me.FirstFieldName & vbCrLf & Me.SecondFieldName, vbOKOnly
End Sub
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Arvin said:
How do you want to display the subform record?

The form's total number of records can be displayed in a text box by
setting
its controlsource:

=IIf([NewRecord],"New Record",[CurrentRecord] & " of " & Count(*))
I have a button on my access 2003 main form. Like to click on the button
and
display the active record on my subform and also display subform's total
number of records. how?.
 

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

Top