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  

Combo box / update



 
 
Thread Tools Display Modes
  #1  
Old June 22nd, 2005, 03:33 AM
Abay
external usenet poster
 
Posts: n/a
Default Combo box / update

I have a combo box which displays values based on a table's index, namely
"Cname". On a match, other fields on my form are populated. When there is
no match, data from the first record in the table is displayed (which I
don't want). The form layout has the combo field, followed by the Cname
field an and so on.

I would like the data keyed into the combo field (called Search) on a "no
match" situation to be added to the table as a new entry along with the data
from the rest of the fields in the form, or failing that be displayed in the
field "Cname" and then data can be entered into the rest of the form and in
the end create a new record in the table.

Basically I don't want the user to have to re-key the search/Cname field
again after a failed search, which is what happens now.

Ideally I would like to have one field, i.e. the combo box, which on a no
match situation retains the data keyed in to update the "Cname" field.

Hope the above makes sense .. am pretty new to combo boxes.

Any help would be much appreciated.

Abay


  #2  
Old June 22nd, 2005, 05:45 AM
Bob Howard
external usenet poster
 
Posts: n/a
Default

Check into the "On Not in List" event for the combo box --- in that routine,
you could add code to add the entry into the table...


"Abay" wrote in message
...
I have a combo box which displays values based on a table's index, namely
"Cname". On a match, other fields on my form are populated. When there

is
no match, data from the first record in the table is displayed (which I
don't want). The form layout has the combo field, followed by the Cname
field an and so on.

I would like the data keyed into the combo field (called Search) on a "no
match" situation to be added to the table as a new entry along with the

data
from the rest of the fields in the form, or failing that be displayed in

the
field "Cname" and then data can be entered into the rest of the form and

in
the end create a new record in the table.

Basically I don't want the user to have to re-key the search/Cname field
again after a failed search, which is what happens now.

Ideally I would like to have one field, i.e. the combo box, which on a no
match situation retains the data keyed in to update the "Cname" field.

Hope the above makes sense .. am pretty new to combo boxes.

Any help would be much appreciated.

Abay




  #3  
Old June 23rd, 2005, 04:33 AM
Abay
external usenet poster
 
Posts: n/a
Default

Many thanks .. I will try that out .. abay


"Bob Howard" wrote in message
...
Check into the "On Not in List" event for the combo box --- in that

routine,
you could add code to add the entry into the table...


"Abay" wrote in message
...
I have a combo box which displays values based on a table's index,

namely
"Cname". On a match, other fields on my form are populated. When

there
is
no match, data from the first record in the table is displayed (which I
don't want). The form layout has the combo field, followed by the Cname
field an and so on.

I would like the data keyed into the combo field (called Search) on a

"no
match" situation to be added to the table as a new entry along with the

data
from the rest of the fields in the form, or failing that be displayed in

the
field "Cname" and then data can be entered into the rest of the form and

in
the end create a new record in the table.

Basically I don't want the user to have to re-key the search/Cname field
again after a failed search, which is what happens now.

Ideally I would like to have one field, i.e. the combo box, which on a

no
match situation retains the data keyed in to update the "Cname" field.

Hope the above makes sense .. am pretty new to combo boxes.

Any help would be much appreciated.

Abay






 




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
Many-to-many implementation problem Al Williams Database Design 15 April 29th, 2005 05:19 PM
Design help, please SillySally Using Forms 27 March 6th, 2005 05:11 AM
Update and sort combo box values nermin Using Forms 3 January 31st, 2005 04:16 PM
Office XP Update Problem Bill General Discussions 0 December 1st, 2004 07:11 PM
Command button to update choices in a combo box accessbabe General Discussion 1 August 6th, 2004 06:03 AM


All times are GMT +1. The time now is 12:00 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.