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 / January 2006

Tip: Looking for answers? Try searching our database.

Vis Basic Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tom B - 06 Jan 2006 18:50 GMT
I have the following code in an Event Procedure in a "on Current" part of the
form.
I have two datasheets, one a subform of another where I select an item on
the first datasheet and information is shown on that item in the second
datasheet.

I want to add a third datasheet and also changes when I select an item in
the first datasheet.  

I don't know how to write this code but need to add that third datasheet
(called RFI Subform) into this code.

Can someone help me out with this?

Thanks, code is shown below

Sub Form_Current()

   Dim ParentDocName As String

   On Error Resume Next
   ParentDocName = Me.Parent.Name

   If Err <> 0 Then
       GoTo Form_Current_Exit
   Else
       On Error GoTo Form_Current_Err
       Me.Parent![Submittal Subform].Requery
   End If

Form_Current_Exit:
   Exit Sub

Form_Current_Err:
   MsgBox Error$
   Resume Form_Current_Exit

End Sub
david@epsomdotcomdotau - 07 Jan 2006 22:31 GMT
This just refreshes the datasheet.

The only line which does anything in this event is:

>         Me.Parent![Submittal Subform].Requery

You can add another line in the same place like this

   me.parent![RFI Subform].requery

(david)

> I have the following code in an Event Procedure in a "on Current" part of the
> form.
[quoted text clipped - 34 lines]
>
> End Sub
Tom B - 09 Jan 2006 14:30 GMT
I'm looking for both forms to refresh, how can I incorporate both lines in
that code?

> This just refreshes the datasheet.
>
[quoted text clipped - 47 lines]
> >
> > End Sub
david epsom dot com dot au - 09 Jan 2006 21:46 GMT
> I'm looking for both forms to refresh, how can I incorporate both lines

You can add the other line in the same place.

(david)

> I'm looking for both forms to refresh, how can I incorporate both lines in
> that code?
[quoted text clipped - 54 lines]
>> >
>> > End Sub
 
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.