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

Tip: Looking for answers? Try searching our database.

combobox & Subform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Karen53 - 09 May 2008 20:11 GMT
Hi,

I'm having trouble with this.  I found a previous post and thought I had the
answer but am still having trouble.

I have an unbound combobox looking up a list.  Once a selection is made I
have code to pull the value of the unbound combobox into a bound textbox.

This much works.  When I change the combobox value the textbox changes
approriately.

I have a sub form to display all of the related information to the choice on
the list.  The subform has parent link and child link set to the bound value
of the text box.  My problem is the sub form does not update to reflect the
change.  Also, when I try to go to design mode or close the form I get an
error message it can't be saved because it would create duplicate index,
primary key, etc.

Option Compare Database

Private Sub cboMovieTitle_AfterUpdate()

   Me.txtmovieID = Me.cboMovieTitle
   
End Sub

since it wasn't updating, I tried this...

added to movieID on query
[forms]![frmEditMovies]![txtmovieID]

code
Private Sub txtmovieID_Change()

   Me.Requery
   
End Sub

Signature

Thanks for your help.
Karen53

Karen53 - 09 May 2008 20:33 GMT
Hi,

Never mind.  I got it.
Signature

Thanks for your help.
Karen53

> Hi,
>
[quoted text clipped - 33 lines]
>    
> End Sub
Karen53 - 09 May 2008 20:41 GMT
Hi,

No, I got it to work all on one form but how do I link it to a sub form?
Signature

Thanks for your help.
Karen53

> Hi,
>
[quoted text clipped - 33 lines]
>    
> End Sub
Beetle - 10 May 2008 00:32 GMT
What are you trying to do? If you're trying to find a record on your form
based on the value selected in the combo box, then you're going about it
the wrong way. You don't want to actually change the value of the bound
MovieID text box, you just want to *find* the record with the matching ID.

The After Update event of your combo box should have code like this;

With Me.RecordsetClone
 .FindFirst "[MovieID]=" & Me.YourComboBox
 If Not .NoMatch Then
   Me.Bookmark = .Bookmark
 End If
End With
Signature

_________

Sean Bailey

> Hi,
>
[quoted text clipped - 37 lines]
> >    
> > End Sub
Karen53 - 11 May 2008 22:27 GMT
Thank you beetle

Signature

Thanks for your help.
Karen53

> What are you trying to do? If you're trying to find a record on your form
> based on the value selected in the combo box, then you're going about it
[quoted text clipped - 51 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.