Transferring option group value

S

shiro

I'm trying to create a form for adding new record only.
How to do that ?. In that from,I want to put an option
button ( group ) to shown or hide some text box ( control )
in my forms.But I also want to transferr the option group value
to a field once the form close or the Save_cmd is clicked.
Then in another qury I need to join the value transferred
from the option group with another table so that the data
appear as a text in another table.

Please advice how to do that since I have no idea
with coding?
 
M

Marshall Barton

shiro said:
I'm trying to create a form for adding new record only.
How to do that ?. In that from,I want to put an option
button ( group ) to shown or hide some text box ( control )
in my forms.But I also want to transferr the option group value
to a field once the form close or the Save_cmd is clicked.
Then in another qury I need to join the value transferred
from the option group with another table so that the data
appear as a text in another table.


To force a form to only all new records, set the form's
AllowEdits and AllowDeletions properties to No.
Alternatively, you can leave those properties set to Yes and
specify acFormAdd in the OpenForm method's DataMode
argument.

The Value of the option group frame will be the OptionValue
of the selected option button. To save that value, all you
need to do is bind the option frame to your table field.

Once you have thevalues save in the table, you can use that
field to join to another table in the usual way.

To make another control visible/invisible depending on the
selected option, use code like:
Select Case Me.optionframe
Case x, y, z 'values that make other control visible
Me.othercontrol.Visible = True
Case Else
Me.othercontrol.Visible = False
End Select
in both the option frame control's AfterUpdate event and in
the form's Current event.
 

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