Re: Populate value when a form is opened



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.
> >
> >
> >


.



Relevant Pages

  • Re: Populate value when a form is opened
    ... > The row source for the combo in "formA" is a query that returns a single ... I open "formA" from another ... When the "formA" is opened the combo box is empty. ... >> display the ...
    (microsoft.public.access.formscoding)
  • Hiding the anchor tag in asp.net 1.1 based on condition - help me
    ... empty i dont want to display in datalist .How can i do that? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: messagebox code not working
    ... The variable shows as empty and the application falls over when trying to display the second combobox value. ... i dont know why this is the case. ...
    (microsoft.public.dotnet.general)
  • Re: Fuzzy Still Pictures
    ... "Dont use DV AVI since it distorts pixels to non-square size." ... Isn't pixel aspect specific to the display device, ...
    (microsoft.public.windowsxp.moviemaker)
  • Re: factoring higher degree questions
    ... >>>you display will be archived forever. ... >> the only ignorance displayed forever is yours - shown by your arrogant ... higher degree polynomials - i dont remember him asking about quadratics, ...
    (sci.math.symbolic)