Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / November 2005

Tip: Looking for answers? Try searching our database.

Check Box Support

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MattC - 22 Nov 2005 18:42 GMT
I have a check box on a form that when checked opens another form and copies
data to the newly opened form. Once the new form has been opened and data
added I would like the check box on the main form to be removed. However if a
user click on the check box I would like it to open the associated form and
the data originally created.

What is happening know is the check box is being toggled off and on. Users
don't know if there is data in the sub form or not. If they click on the
check box it tries create a second record. However I have the table of this
form set to not allow more then one record based on the link ID.

Any help would be greatly appreciated.

Matt
Graham R Seach - 23 Nov 2005 02:35 GMT
Matt,

In the checkbox's Click or AfterUpdate event, you need to check if the
record exists, and if so, open the form, and if not, append the record.

Private Sub chkMyCheckBox_Click()
   If (Me.chkMyCheckBox = True) Then
       If Not IsNull(DLookup("fieldname", "tablename", "somecriteria") Then
           DoCmd.OpenForm "formname", , , "somecriteria"
       Else
           'Add code to append the new record
       End If

       Me.chkMyCheckBox = False
   End If
End Sub

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

>I have a check box on a form that when checked opens another form and
>copies
[quoted text clipped - 14 lines]
>
> Matt
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.