PC Review


Reply
Thread Tools Rate Thread

Display record in a combo box

 
 
ggerke
Guest
Posts: n/a
 
      30th Sep 2008
Hello all,
I have an unbound combo box which I use to lookup records from a table, call
it [fieldID]. I would like to display the first record as the default in the
combo box so it doesn't show as blank when the form is opened. Is there a way
to show the first record in the table without binding the combo box?
Additionally, can I use an IF Then to show a specific record if it exists,
(eg IF fieldID = "ABC" THEN [cbo lookup].defaultvalue="ABC")???
Your help is much appreciated.

 
Reply With Quote
 
 
 
 
Allen Browne
Guest
Posts: n/a
 
      30th Sep 2008
Try setting the combo's Default Value.

Something like this:
=[Combo1].ItemData(0)

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"ggerke" <(E-Mail Removed)> wrote in message
news:AEF4F696-F377-4095-AEB2-(E-Mail Removed)...
> Hello all,
> I have an unbound combo box which I use to lookup records from a table,
> call
> it [fieldID]. I would like to display the first record as the default in
> the
> combo box so it doesn't show as blank when the form is opened. Is there a
> way
> to show the first record in the table without binding the combo box?
> Additionally, can I use an IF Then to show a specific record if it exists,
> (eg IF fieldID = "ABC" THEN [cbo lookup].defaultvalue="ABC")???
> Your help is much appreciated.


 
Reply With Quote
 
ggerke
Guest
Posts: n/a
 
      30th Sep 2008


"Allen Browne" wrote:

> Try setting the combo's Default Value.
>
> Something like this:
> =[Combo1].ItemData(0)
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
> "ggerke" <(E-Mail Removed)> wrote in message
> news:AEF4F696-F377-4095-AEB2-(E-Mail Removed)...
> > Hello all,
> > I have an unbound combo box which I use to lookup records from a table,
> > call
> > it [fieldID]. I would like to display the first record as the default in
> > the
> > combo box so it doesn't show as blank when the form is opened. Is there a
> > way
> > to show the first record in the table without binding the combo box?
> > Additionally, can I use an IF Then to show a specific record if it exists,
> > (eg IF fieldID = "ABC" THEN [cbo lookup].defaultvalue="ABC")???
> > Your help is much appreciated.

>
> Thank-you very much

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: combo box display current record value Ray Microsoft Access Form Coding 0 23rd Jul 2009 10:29 PM
Record doesn't display in combo Peter Stone Microsoft Access Forms 1 3rd May 2009 06:37 AM
Selecting which record Combo box will display sharontodd Microsoft Access VBA Modules 2 18th Jul 2008 01:56 AM
Combo Box - Display value of current record ToniS Microsoft Access 0 28th Jan 2008 10:37 PM
Display First Record from Combo Box justin.poole@gmail.com Microsoft Access 1 1st Sep 2006 12:58 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:12 PM.