Re: Populate value when a form is opened
- From: "Rob Oldfield" <blah@xxxxxxxx>
- Date: Wed, 26 Oct 2005 10:57:34 +0100
Aaah. Got you now I think.
me.cboName=me.cboName.itemdata(0)
"PS" <PS@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:232B46C3-394E-4884-B6A9-6491CD9AFEB6@xxxxxxxxxxxxxxxx
> I do not know which part you dont understand. OK. Let me be more
specific.
>
> The row source for the combo in "formA" is a query that returns a single
> value. The control source is the table field. I open "formA" from
another
> (formB) and go to a new record (DoCmd.GoToRecord , , acNewRec), which
works
> fine. When the "formA" is opened the combo box is empty (like other
fields).
> I do not want it to be empty because I dont want the user to select it
from
> the drop down. Rather I want to somehow populate the value as soon as the
> "fromA" is opened.
>
> Hope it now makes sense.
>
>
> "Rob Oldfield" wrote:
>
> > Still makes no sense. What is "that"?
> >
> > "PS" <PS@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> > news:41C6C8C7-B278-45F6-9E52-3021FEAA49A7@xxxxxxxxxxxxxxxx
> > > Sorry if I was not very clear. Unless I go and select the value from
the
> > > combo drop down the value would come up. What I need is as soon as I
open
> > > the form I want that to be displayed.
> > >
> > > I have already tried Me.ComboName = Value. This is not working.
> > >
> > > "Ofer" wrote:
> > >
> > > > On the OnLoad event of the form, enter the code
> > > > Me.ComboName = Value
> > > > --
> > > > If I answered your question, please mark it as an answer. That way,
it
> > will
> > > > stay saved for a longer time, so other can benifit from it.
> > > >
> > > > Good luck
> > > >
> > > >
> > > >
> > > > "PS" wrote:
> > > >
> > > > > Gurus,
> > > > >
> > > > > I have a combo box in a form. When the form is opened I want to
> > display the
> > > > > value which is in the combo box. At any given time there will be
only
> > one
> > > > > value.
> > > > >
> > > > > How would I go about it. Appreciate any help.
> > > > >
> > > > > Thanks a million.
> >
> >
> >
.
- Prev by Date: Re: Insert Into and automatic record entry
- Next by Date: Re: Populate value when a form is opened
- Previous by thread: Re: code for an <ALT + R> key
- Next by thread: Re: Populate value when a form is opened
- Index(es):
Relevant Pages
|