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

Tip: Looking for answers? Try searching our database.

Set combobox value on Seperate form close

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pfm721 - 30 Jun 2008 16:31 GMT
I have a from "Form1" that has a subform "frmInfosub". Sub form has a combo
box to select a vendor. If the vendor is not in the list the can click on
<New> and it will open the add vendor form. When that form closes I would
like the Vendor name combo on my subform to display the vendor that was just
entered. I am having a problem getting the coding right for this.

I know that if the field was just on the mainform it would look like this

Forms!Form1.cboVendor.Refresh

However I am not sure how to code for an item on a subform

thanks.
rm - 30 Jun 2008 17:01 GMT
This is a "rough" estimate based on memory and the fact that I had
trouble with this too... Look in the help file - there is a topic in
there about this exact issue. I think that you have to set focus on
the sub form then requery.

On the other hand you can create a public function in the sub form
with a line to requery the combo box on the sub form. I am no so sure
that that would be the cleanest approach though.

> I have a from "Form1" that has a subform "frmInfosub". Sub form has a combo
> box to select a vendor. If the vendor is not in the list the can click on
[quoted text clipped - 9 lines]
>
> thanks.
Douglas J. Steele - 30 Jun 2008 17:19 GMT
Assuming that the name of the subform control on Form1 is named frmInfosub,
you'd use

Forms!Form1!frmInfosub.Form!cboVendor

Depending on how you added frmInfosub as a subform, though, the name of the
control on Form1 may be different. If it is, use the name of the control
rather than frmInfosub.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

>I have a from "Form1" that has a subform "frmInfosub". Sub form has a combo
> box to select a vendor. If the vendor is not in the list the can click on
[quoted text clipped - 10 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.