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  

Requery ?



 
 
Thread Tools Display Modes
  #1  
Old June 25th, 2004, 08:51 PM
JK
external usenet poster
 
Posts: n/a
Default Requery ?

I have a form with customer and account info based on
corresponding tables. I have a combo box displaying all
companies but if the company isn't listed, I'd like to add
a button that will open a form to enter the new company
info. No problem, but when I close the company entry form
and return to the Company/account form how can I get the
new company to show in my drop down list? Also while I'm
here, how can I sort my combobox alphabetically? Thanks
for any pointers you can provide.
  #2  
Old June 25th, 2004, 09:47 PM
Ken Snell
external usenet poster
 
Posts: n/a
Default Requery ?

In the OnClose event of the form that allows the person to enter the new
entry, put this code:

Private Sub Form_Close()
[Forms]![FirstFormName]!ComboBoxName.Requery
End Sub


To sort the combo box list, use a query as the row source list and include a
sorting order on the desired field to sort that field in ascending order.

--

Ken Snell
MS ACCESS MVP

"JK" wrote in message
...
I have a form with customer and account info based on
corresponding tables. I have a combo box displaying all
companies but if the company isn't listed, I'd like to add
a button that will open a form to enter the new company
info. No problem, but when I close the company entry form
and return to the Company/account form how can I get the
new company to show in my drop down list? Also while I'm
here, how can I sort my combobox alphabetically? Thanks
for any pointers you can provide.



  #3  
Old June 25th, 2004, 10:52 PM
JK
external usenet poster
 
Posts: n/a
Default Requery ?

Thank you very much! You all are great.

-----Original Message-----
In the OnClose event of the form that allows the person

to enter the new
entry, put this code:

Private Sub Form_Close()
[Forms]![FirstFormName]!ComboBoxName.Requery
End Sub


To sort the combo box list, use a query as the row source

list and include a
sorting order on the desired field to sort that field in

ascending order.

--

Ken Snell
MS ACCESS MVP

"JK" wrote in

message
...
I have a form with customer and account info based on
corresponding tables. I have a combo box displaying all
companies but if the company isn't listed, I'd like to

add
a button that will open a form to enter the new company
info. No problem, but when I close the company entry

form
and return to the Company/account form how can I get the
new company to show in my drop down list? Also while I'm
here, how can I sort my combobox alphabetically? Thanks
for any pointers you can provide.



.

  #4  
Old June 26th, 2004, 01:16 AM
Ken Snell
external usenet poster
 
Posts: n/a
Default Requery ?

You're welcome.

--

Ken Snell
MS ACCESS MVP

"JK" wrote in message
...
Thank you very much! You all are great.



 




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 Method Nexus Running & Setting Up Queries 1 June 25th, 2004 12:14 PM
Continuous form requery Randy Harris New Users 0 May 25th, 2004 10:25 PM
Requery Combobox MJ Running & Setting Up Queries 7 May 25th, 2004 11:01 AM


All times are GMT +1. The time now is 02:01 PM.


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