Re: passing variables

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Vic (Vic_at_discussions.microsoft.com)
Date: 08/20/04


Date: Fri, 20 Aug 2004 06:19:02 -0700

Hello,

Sorry, I should have been more clear. Im looking to have results displayed
in text fields yes...but for the actual searching part, Im looking to have 1
combo box, and 1 text box. The combo box is represents which field in the
database the text box is searching.
Does that make more sense?

Thanks so much for all the help,
Vic

"Dan Artuso" wrote:

> Hi,
> If you mean you want to display the results in a text box instead, yes,
> you would have to open up a recordset, loop through the results building a comma delimited string
> and then diplay the string in the text box.
>
> HTH
> Dan Artuso, MVP
>
> "Vic" <Vic@discussions.microsoft.com> wrote in message news:2184D920-C5A4-433F-95DB-2F907EB5A391@microsoft.com...
> > Hi Dan,
> > That worked perfectly, thank you.
> > I was curious if instead of making a 2nd combo box to show all the fields,
> > could I make a text box to look up?
> > so instead of "cboBox2" I now have "txtBox2"...will this require coding
> > again??
> >
> > Thank you very much for the help,
> > Vic
> >
> > "Dan Artuso" wrote:
> >
> > > Hi,
> > > No easy fix. You have to write some code.
> > > In the AfterUpdate of cbo1:
> > >
> > > Dim strSql as String
> > >
> > > strSql = "Select " & cboBox1 & " From tblTable1"
> > > Me.cboBox2.Rowsource = strSql
> > > Me.cboBox2.Requery
> > >
> > > HTH
> > > Dan Artuso, MVP
> > >
> > > "Vic" <Vic@discussions.microsoft.com> wrote in message news:2C843780-3276-4F96-9489-2944ECC584BB@microsoft.com...
> > > > I have a quick quesiton on how to pass variables.
> > > > I have 2 combo boxes. One named "cboBox1" and the 2nd is named "cboBox2".
> > > > "cboBox2" contains all the field names of a table called "tblTable1", and I
> > > > want "cboBox2" to contain all the values in the field that the user selects
> > > > in "cboBox1".
> > > > I have "cboBox1" working fine...but this is what I tried for the 2nd box.
> > > > I tried to make an SQL query like so:
> > > > SELECT cboBox1.value FROM tblTable1
> > > > but this doesnt seem to work.
> > > > What happens is, if I chose a field called "FirstName" in "cboBox1" then
> > > > "cboBox2" will have the word "FirstName" over and over (as many times as
> > > > there are records) in the drop down part.
> > > > Hopefully there is an easy fix for this problem...
> > > > Thanks for your help,
> > > > Vic
> > >
> > >
> > >
>
>
>



Relevant Pages

  • Re: Can I mimic a btn_Click() ?
    ... In the sample code instead of searching an event with type of ... Other remote UDP command are> OK as long as the display is not affected. ... Once I'm in the> CalibrateLCD_Clickevent handler my sender and "this" look OK in my> "Autos" window in both cases. ...
    (microsoft.public.dotnet.framework.compactframework)
  • For readers
    ... I keep searching for the perfect gadget to take ... Around a 6" x 9" display ... The purpose of the operating is *mainly* to retrieve (from ... I know there have been some ebook-type reader marketing failures, ...
    (microsoft.public.pocketpc)
  • Re: Create and store unique record number.
    ... > I've been searching through the threads trying to find a post that ... RecordID field and RecordDate field. ... You can just store the date and format it to give the value you ... It would be better to have to fields and use a calculated field to display ...
    (microsoft.public.access.forms)
  • Re: Create a button to save/update record OR add new record
    ... automatic in ms-access anyway). ... So, you need some caution if you are use the SAME form for searching, as any ... ' invoice exist...lets display the invoice form ... invoice form to ONE record,then you can hide/disable the record navigation ...
    (microsoft.public.access.forms)
  • Re: How to retrieve a specific record into a form to edit it?
    ... specific record for editing data in the form .. ... > A common thing is to have a combo box where the user can make a selection and the whole ... > Dan Artuso, Access MVP ... >> i have to do to retrieve a specific record to display in form for editing ...
    (microsoft.public.access.forms)