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 / Modules / DAO / VBA / March 2005

Tip: Looking for answers? Try searching our database.

Opening a subform to enter data to the current record in the paren

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jennifer P - 25 Mar 2005 01:43 GMT
I have designed a Parent form called Daily Dispatch Log.  However I rarely
enter vehicle information so I wanted to use a command button to open a
subform to enter vehicle information when I need to.  The subform opens to
record 1 instead of the current record that the parent is working in.  What
needs to be done.

Thanks Jen
anonymous@discussions.microsoft.com - 25 Mar 2005 04:34 GMT
Subforms are forms that are embedded in a parent form and
are open all the time.  Parent and child will not be
synchronized unless the linked fields are specified in
the subform control.

However, it sounds like you want a pop-up form that
displays infrequently used/edited info.  
- create the pop-up form and specify the property
for "pop-up" to Yes.
- set the modal property to "Yes" if you want your users
to deal with that form before going back to the parent.
- the command line in your parent form command button
should contain a "where condition" that contains the
linked info...

Dim strLinkCriteria as String
strLinkCriteria = "[intVehicleID] = " & Cstr(Me!
[intVehicleID])
db.OpenForm "frmVehicleInfoPop",,,strLinkCriteria

>-----Original Message-----
>I have designed a Parent form called Daily Dispatch Log.  However I rarely
[quoted text clipped - 5 lines]
>Thanks Jen
>.
Jennifer P - 25 Mar 2005 15:05 GMT
This is what I have so far but I can't seem to get yours to run..I keep
getting a run time error when I add it to what I have:

Private Sub Vehicle_Information__Form_Click()
On Error GoTo Err_Vehicle_Information__Form_Click

   Dim stDocName As String
   Dim stLinkCriteria As String

   stDocName = "Vehicle"
   DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Vehicle_Information__Form_Click:
   Exit Sub

Err_Vehicle_Information__Form_Click:
   MsgBox Err.Description
   Resume Exit_Vehicle_Information__Form_Click
   
End Sub

> Subforms are forms that are embedded in a parent form and
> are open all the time.  Parent and child will not be
[quoted text clipped - 29 lines]
> >Thanks Jen
> >.
 
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.