Re: passing variables
From: Vic (Vic_at_discussions.microsoft.com)
Date: 08/20/04
- Next message: Joan Wild: "Re: Bulletproofing database with .mde file"
- Previous message: Roger Carlson: "Re: Where to declare variables"
- In reply to: Dan Artuso: "Re: passing variables"
- Next in thread: Dan Artuso: "Re: passing variables"
- Reply: Dan Artuso: "Re: passing variables"
- Messages sorted by: [ date ] [ thread ]
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
> > >
> > >
> > >
>
>
>
- Next message: Joan Wild: "Re: Bulletproofing database with .mde file"
- Previous message: Roger Carlson: "Re: Where to declare variables"
- In reply to: Dan Artuso: "Re: passing variables"
- Next in thread: Dan Artuso: "Re: passing variables"
- Reply: Dan Artuso: "Re: passing variables"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|