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 / February 2008

Tip: Looking for answers? Try searching our database.

Update subform query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PD - 18 Feb 2008 19:49 GMT
On my form I have "Model" linked to "Model" on my subform.  My subform data
source is a select query.  It works well, but the subform will not update
until you step off the record.  I am trying to update my subform when I
change the Model selection.

Thanks,
Signature

PRD

Jeanette Cunningham - 18 Feb 2008 20:22 GMT
Are you trying to choose a model on the main form and then show the details
for that model on the subform?

You can do this if you have an unbound combo on the main form where users
can select a model.

On the after update event for the model combo put
   Me.Requery

Jeanette Cunningham

> On my form I have "Model" linked to "Model" on my subform.  My subform
> data
[quoted text clipped - 3 lines]
>
> Thanks,
PD - 18 Feb 2008 20:35 GMT
Thanks Jeanette,

After I added the "Me.Requery" to the after update the form acted as follows;

I select new record (all fields blank), I select a model from the drop down
and the form reverts to record number 1 and the subform displays the
information contained in record 1 even though the model is different.  
Perhaps this is because the Model combo is bound?
Signature

PRD

> Are you trying to choose a model on the main form and then show the details
> for that model on the subform?
[quoted text clipped - 14 lines]
> >
> > Thanks,
Jeanette Cunningham - 18 Feb 2008 20:38 GMT
You do need to make the model combo unbound.

Jeanette Cunningham

> Thanks Jeanette,
>
[quoted text clipped - 27 lines]
>> >
>> > Thanks,
PD - 19 Feb 2008 19:59 GMT
Jeanette,

I was able to use "Refresh" in the Model Combo after update event.  It seems
to work well.  Another question...how can I double-click the text in a field
and have it copied to another field on the same form?

Thanks again!
Signature

PRD

> You do need to make the model combo unbound.
>
[quoted text clipped - 31 lines]
> >> >
> >> > Thanks,
Jeanette Cunningham - 19 Feb 2008 21:05 GMT
PD,

Code the double click event
Select the control txtOriginal
property dialog | events tab | click the button with ellipsis ( ...)
opposite On Dbl Click
choose code builder | OK
type the following line in the code windw that opens

Me.txtCopy = Me.txtOriginal

It should look like this:

Private Sub txtOriginal_DblClick(Cancel As Integer)
   Me.txtCopy = Me.txtOriginal
End Sub

replace txtOriginal and txtCopy with the names of your controls

Jeanette Cunningham

> Jeanette,
>
[quoted text clipped - 44 lines]
>> >> >
>> >> > Thanks,
 
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.