By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,853 Members | 992 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,853 IT Pros & Developers. It's quick & easy.

Visible button on Sub form

P: n/a
I have a form in access 2000 with a combo box containing names, this
is linked to a sub form by the name index. on the sub form is a
button that when pressed automatically enters the date into the date
field. Now my problem is that when someone comes in and finds their
name and presses the sign in button it is no longer visible so they
can not sign in more than once that day.

My trouble is that i can nor remember how to use the button on the sub
form for the life of me, and it would be easier to ask the question
rather than wait for it to come back.

on the combo box i have an afterupdate function

me.(need the bit that selects the button on the sub form).visible =
True

And on the sign in btn i have the following code.

me.date = Now()
docmd.gotocontrol (i need to now the bit that switches the control to
the combo on the main form)
me.sign_in_btn.visible = false

could someone help with the blanks or explain how you activate the sub
form on a main form ie

me.text1 = now()

puts the date in the text 1 box on the current form you are on,

but what is the code to put the date in a date text field on a sub
form (sub form called form2) that is on the main form (main Form
called Form1)

Hope someone can help with this keep coming up against sub form
problems.

Nov 12 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
rkc
feeman wrote:
I have a form in access 2000 with a combo box containing names, this
is linked to a sub form by the name index. on the sub form is a
button that when pressed automatically enters the date into the date
field. Now my problem is that when someone comes in and finds their
name and presses the sign in button it is no longer visible so they
can not sign in more than once that day.

My trouble is that i can nor remember how to use the button on the sub
form for the life of me, and it would be easier to ask the question
rather than wait for it to come back.

on the combo box i have an afterupdate function

me.(need the bit that selects the button on the sub form).visible =
True

And on the sign in btn i have the following code.

me.date = Now()
docmd.gotocontrol (i need to now the bit that switches the control to
the combo on the main form)
me.sign_in_btn.visible = false

could someone help with the blanks or explain how you activate the sub
form on a main form ie

me.text1 = now()

puts the date in the text 1 box on the current form you are on,

but what is the code to put the date in a date text field on a sub
form (sub form called form2) that is on the main form (main Form
called Form1)
The controls on a form in a subform control can be referenced
using the Controls collection of the subform control.

So a command button named Command0 on the form in a subform control
can be referenced from the main form as:

Me.SubFormControlName.Controls("Command0").Visible = True
To return to the combobox on the main form from the command button
click event on the form in the subform control:

Me.Parent.Controls("Combo0").SetFocus
Nov 13 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.