A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Form/Subform/ComboBox Requery



 
 
Thread Tools Display Modes
  #1  
Old August 18th, 2005, 10:31 PM
Karen
external usenet poster
 
Posts: n/a
Default Form/Subform/ComboBox Requery

Access 2000 – Issue Database
I have the following:

Tables:
Issue – stores issue information. Primary Key is IssueID.
Provider – stores provider information. Primary Key is ProviderID. Relates
to ProvIssDetail table (one-to-many)
ProvIssDetail – fields are ProvDetailID (Primary Key), ProviderID, and
IssueID. IssueID field relates to Issue table Primary Key (one-to-many).

Forms:
Form - Enter Issue - user enters new issue information
Sub form - Provider – user enters providers associated with the issue. Can
be up to two providers. The record source is a query of Provider and
ProvIssDetail tables. The Link Child and Master fields are IssueID.
Continuous form.
Form – Add Provider – user enters provider if not found in list on combo box
in Provider sub form.

What I would like to happen:
When entering the issue, the user will select a provider from a combo box on
the subform. If the provider is not on the list, the user double clicks the
Provider Name field and the Add Provider form will pop up. The user enters
the provider information, closes the form and the selects the name from the
Provider combo on the subform. The user will then select another provider if
applicable. The max that can be entered on the subform should be two
providers. The user then tabs on through the main form to finish entering
the issue information.

I have limited knowledge of vba. Can this be accomplished using macros or
is vba best?


  #2  
Old August 19th, 2005, 04:03 AM
Larry Linson
external usenet poster
 
Posts: n/a
Default


"Karen" wrote

When entering the issue, the user will
select a provider from a combo box on
the subform. If the provider is not on
the list, the user double clicks the
Provider Name field and the Add Pro-
vider form will pop up. The user enters
the provider information, closes the form
and the selects the name from the
Provider combo on the subform. The user
will then select another provider if
applicable. The max that can be entered
on the subform should be two providers.
The user then tabs on through the main
form to finish entering the issue information.
I have limited knowledge of vba. Can
this be accomplished using macros or
is vba best?


You will need to do this with VBA. But, you can use the NotInList event of
the Combo Box to ask if the user wishes to add the new Provider. I believe
there is an example you might adapt in the Developer Solutions database
which you can download from
http://msdn.microsoft.com/library/de...dbdownload.asp

Larry Linson
Microsoft Access MVP


  #3  
Old August 19th, 2005, 10:40 PM
Karen
external usenet poster
 
Posts: n/a
Default

I have created all the forms. I just can't get the Provider field on the
subform to requery once I add the new provider. I looked in the developer
sample database and did not see the "On Close" code mentioned in the topic
"Add a New Record to List". I know that the list needs to requery, but I am
not sure how to do it.

"Larry Linson" wrote:


"Karen" wrote

When entering the issue, the user will
select a provider from a combo box on
the subform. If the provider is not on
the list, the user double clicks the
Provider Name field and the Add Pro-
vider form will pop up. The user enters
the provider information, closes the form
and the selects the name from the
Provider combo on the subform. The user
will then select another provider if
applicable. The max that can be entered
on the subform should be two providers.
The user then tabs on through the main
form to finish entering the issue information.
I have limited knowledge of vba. Can
this be accomplished using macros or
is vba best?


You will need to do this with VBA. But, you can use the NotInList event of
the Combo Box to ask if the user wishes to add the new Provider. I believe
there is an example you might adapt in the Developer Solutions database
which you can download from
http://msdn.microsoft.com/library/de...dbdownload.asp

Larry Linson
Microsoft Access MVP



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Requery Subform A from Subform B Robert_L_Ross Using Forms 6 June 24th, 2005 12:11 AM
record positioning after requery / continuous forms Dana Using Forms 7 May 4th, 2005 05:23 PM
Requery for combo box with data fields Brenda morris via AccessMonster.com Using Forms 1 May 2nd, 2005 04:48 PM
Requery Ipaint General Discussion 1 January 7th, 2005 11:49 PM
can't get requery to work, Don Using Forms 2 July 23rd, 2004 09:10 PM


All times are GMT +1. The time now is 08:01 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.