Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: Combo Box Columns

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Combo Box Columns
"gjameson via AccessMonster.com" <u21717[ at ]uwe> 02.09.2006 19:59:18
I have a combo box on a login page which has 4 columns. Once the right user
id and password are entered the login page goes to a form that is unbound and
has a subform on it. The subform is supposed to show open tickets for the
person who logged in. I am having problems getting Column(3) from login to
the query that is to show their tickets. I have tried so many things I really
do not know where to go from here.

Query for login combo box:

SELECT tblEmployees.lngMyEmpID, tblEmployees.strWorkID, tblEmployees.
strEmpName, tblEmployees.strEmpID
FROM tblEmployees;


Query for subform:

SELECT [Maint Records].ID, [Maint Records].strEmpID, [Maint Records].
strWorkID, [Maint Records].[Date Issued], [Maint Records].Action, [Maint
Records].Problem, [Maint Records].[Date Resolved], [Maint Records].Status,
[Maint Records].[Ticket Number], [Maint Records].Notes
FROM tblEmployees INNER JOIN [Maint Records] ON tblEmployees.strEmpID =
[Maint Records].strEmpID
WHERE ((([Maint Records].strEmpID)=Forms!splash!cboEmployee.Column(3)))
ORDER BY [Maint Records].[Date Issued] DESC;

Help..................

TIA
Gerald

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200609/1

Re: Combo Box Columns
"Douglas J. Steele" <NOSPAM_djsteele[ at ]NOSPAM_canada.com> 02.09.2006 20:07:13
I don't believe SQL is capable of working with the Columns collection: it
simply doesn't know about VBA concepts like that.

You could try putting a hidden text box on the form, and populating it with
the contents of the combo box in its AfterUpdate event.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"gjameson via AccessMonster.com" <u21717[ at ]uwe> wrote in message
news:65b447938024c[ at ]uwe...
[Quoted Text]
>I have a combo box on a login page which has 4 columns. Once the right user
> id and password are entered the login page goes to a form that is unbound
> and
> has a subform on it. The subform is supposed to show open tickets for the
> person who logged in. I am having problems getting Column(3) from login
> to
> the query that is to show their tickets. I have tried so many things I
> really
> do not know where to go from here.
>
> Query for login combo box:
>
> SELECT tblEmployees.lngMyEmpID, tblEmployees.strWorkID, tblEmployees.
> strEmpName, tblEmployees.strEmpID
> FROM tblEmployees;
>
>
> Query for subform:
>
> SELECT [Maint Records].ID, [Maint Records].strEmpID, [Maint Records].
> strWorkID, [Maint Records].[Date Issued], [Maint Records].Action, [Maint
> Records].Problem, [Maint Records].[Date Resolved], [Maint Records].Status,
> [Maint Records].[Ticket Number], [Maint Records].Notes
> FROM tblEmployees INNER JOIN [Maint Records] ON tblEmployees.strEmpID =
> [Maint Records].strEmpID
> WHERE ((([Maint Records].strEmpID)=Forms!splash!cboEmployee.Column(3)))
> ORDER BY [Maint Records].[Date Issued] DESC;
>
> Help..................
>
> TIA
> Gerald
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200609/1
>


Re: Combo Box Columns
"Duane Hookom" <DuaneAtNoSpanHookomDotNet> 02.09.2006 23:10:41
I think you can get by with an invisible text box with a control source of:
=cboEmployee.Column(3). Use the text box in your query criteria.

--
Duane Hookom
MS Access MVP


"Douglas J. Steele" <NOSPAM_djsteele[ at ]NOSPAM_canada.com> wrote in message
news:%23nuesuszGHA.4932[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text]
>I don't believe SQL is capable of working with the Columns collection: it
>simply doesn't know about VBA concepts like that.
>
> You could try putting a hidden text box on the form, and populating it
> with the contents of the combo box in its AfterUpdate event.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "gjameson via AccessMonster.com" <u21717[ at ]uwe> wrote in message
> news:65b447938024c[ at ]uwe...
>>I have a combo box on a login page which has 4 columns. Once the right
>>user
>> id and password are entered the login page goes to a form that is unbound
>> and
>> has a subform on it. The subform is supposed to show open tickets for the
>> person who logged in. I am having problems getting Column(3) from login
>> to
>> the query that is to show their tickets. I have tried so many things I
>> really
>> do not know where to go from here.
>>
>> Query for login combo box:
>>
>> SELECT tblEmployees.lngMyEmpID, tblEmployees.strWorkID, tblEmployees.
>> strEmpName, tblEmployees.strEmpID
>> FROM tblEmployees;
>>
>>
>> Query for subform:
>>
>> SELECT [Maint Records].ID, [Maint Records].strEmpID, [Maint Records].
>> strWorkID, [Maint Records].[Date Issued], [Maint Records].Action, [Maint
>> Records].Problem, [Maint Records].[Date Resolved], [Maint
>> Records].Status,
>> [Maint Records].[Ticket Number], [Maint Records].Notes
>> FROM tblEmployees INNER JOIN [Maint Records] ON tblEmployees.strEmpID =
>> [Maint Records].strEmpID
>> WHERE ((([Maint Records].strEmpID)=Forms!splash!cboEmployee.Column(3)))
>> ORDER BY [Maint Records].[Date Issued] DESC;
>>
>> Help..................
>>
>> TIA
>> Gerald
>>
>> --
>> Message posted via AccessMonster.com
>> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200609/1
>>
>
>


Re: Combo Box Columns
"Allan Murphy" <allanmurphy[ at ]unwired.com.au> 03.09.2006 02:17:49
Is Column(3) the third or fourth column in the query.
Remember columns in a query start at 0

--
Allan Murphy
Email: allanmurphy[ at ]unwired.com.au


"gjameson via AccessMonster.com" <u21717[ at ]uwe> wrote in message
news:65b447938024c[ at ]uwe...
[Quoted Text]
> I have a combo box on a login page which has 4 columns. Once the right
user
> id and password are entered the login page goes to a form that is unbound
and
> has a subform on it. The subform is supposed to show open tickets for the
> person who logged in. I am having problems getting Column(3) from login
to
> the query that is to show their tickets. I have tried so many things I
really
> do not know where to go from here.
>
> Query for login combo box:
>
> SELECT tblEmployees.lngMyEmpID, tblEmployees.strWorkID, tblEmployees.
> strEmpName, tblEmployees.strEmpID
> FROM tblEmployees;
>
>
> Query for subform:
>
> SELECT [Maint Records].ID, [Maint Records].strEmpID, [Maint Records].
> strWorkID, [Maint Records].[Date Issued], [Maint Records].Action, [Maint
> Records].Problem, [Maint Records].[Date Resolved], [Maint Records].Status,
> [Maint Records].[Ticket Number], [Maint Records].Notes
> FROM tblEmployees INNER JOIN [Maint Records] ON tblEmployees.strEmpID =
> [Maint Records].strEmpID
> WHERE ((([Maint Records].strEmpID)=Forms!splash!cboEmployee.Column(3)))
> ORDER BY [Maint Records].[Date Issued] DESC;
>
> Help..................
>
> TIA
> Gerald
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200609/1
>


Re: Combo Box Columns
"gjameson via AccessMonster.com" <u21717[ at ]uwe> 05.09.2006 12:34:59
I am using a text box on my login form with =cboEmployee.Column(3). This
works fine. It is displaying what I need. But this is not getting over to the
other sub-form with the query. I have a txt box on the form that the sub-form
is on and it shows the contents fine too. Is this a problem with having the
login form unbound? When I login and go to the other form it prompts me for
my txtStrID, I enter it and the sub-form query works.

So close.............

TIA
Gerald

Duane Hookom wrote:
[Quoted Text]
>I think you can get by with an invisible text box with a control source of:
>=cboEmployee.Column(3). Use the text box in your query criteria.
>
>>I don't believe SQL is capable of working with the Columns collection: it
>>simply doesn't know about VBA concepts like that.
>[quoted text clipped - 35 lines]
>>> TIA
>>> Gerald

--
Message posted via http://www.accessmonster.com

Re: Combo Box Columns
"Duane Hookom" <DuaneAtNoSpanHookomDotNet> 05.09.2006 14:56:47
What do you mean by "getting over to the other sub-form with the query" and
what is txtStrID?


--
Duane Hookom
MS Access MVP

"gjameson via AccessMonster.com" <u21717[ at ]uwe> wrote in message
news:65d61e6ef858a[ at ]uwe...
[Quoted Text]
>I am using a text box on my login form with =cboEmployee.Column(3). This
> works fine. It is displaying what I need. But this is not getting over to
> the
> other sub-form with the query. I have a txt box on the form that the
> sub-form
> is on and it shows the contents fine too. Is this a problem with having
> the
> login form unbound? When I login and go to the other form it prompts me
> for
> my txtStrID, I enter it and the sub-form query works.
>
> So close.............
>
> TIA
> Gerald
>
> Duane Hookom wrote:
>>I think you can get by with an invisible text box with a control source
>>of:
>>=cboEmployee.Column(3). Use the text box in your query criteria.
>>
>>>I don't believe SQL is capable of working with the Columns collection: it
>>>simply doesn't know about VBA concepts like that.
>>[quoted text clipped - 35 lines]
>>>> TIA
>>>> Gerald
>
> --
> Message posted via http://www.accessmonster.com
>


Re: Combo Box Columns
"gjameson via AccessMonster.com" <u21717[ at ]uwe> 05.09.2006 15:23:32
Once the right user id and password are entered the login page that closes
and a form that is unbound and
has a subform is opened. The subform is supposed to show open tickets for the
person who logged in.

login form to maint form, with a subform, which is filtered by a query,
depending on who logged in on the login form

txtStrID is the hidden text box on my login form
[Forms]![Splash]![txtStrID] is the criteria in my query


Duane Hookom wrote:
[Quoted Text]
>What do you mean by "getting over to the other sub-form with the query" and
>what is txtStrID?
>
>>I am using a text box on my login form with =cboEmployee.Column(3). This
>> works fine. It is displaying what I need. But this is not getting over to
>[quoted text clipped - 21 lines]
>>>>> TIA
>>>>> Gerald

--
Message posted via http://www.accessmonster.com

Re: Combo Box Columns
"Duane Hookom" <DuaneAtNoSpanHookomDotNet> 05.09.2006 16:25:37
Are you leaving the Splash form open?


--
Duane Hookom
MS Access MVP

"gjameson via AccessMonster.com" <u21717[ at ]uwe> wrote in message
news:65d7973cc3aae[ at ]uwe...
[Quoted Text]
> Once the right user id and password are entered the login page that closes
> and a form that is unbound and
> has a subform is opened. The subform is supposed to show open tickets for
> the
> person who logged in.
>
> login form to maint form, with a subform, which is filtered by a query,
> depending on who logged in on the login form
>
> txtStrID is the hidden text box on my login form
> [Forms]![Splash]![txtStrID] is the criteria in my query
>
>
> Duane Hookom wrote:
>>What do you mean by "getting over to the other sub-form with the query"
>>and
>>what is txtStrID?
>>
>>>I am using a text box on my login form with =cboEmployee.Column(3). This
>>> works fine. It is displaying what I need. But this is not getting over
>>> to
>>[quoted text clipped - 21 lines]
>>>>>> TIA
>>>>>> Gerald
>
> --
> Message posted via http://www.accessmonster.com
>


Re: Combo Box Columns
"gjameson via AccessMonster.com" <u21717[ at ]uwe> 05.09.2006 16:37:38
Closing it when I goto the other form. Should I leave it open?

Duane Hookom wrote:
[Quoted Text]
>Are you leaving the Splash form open?
>
>> Once the right user id and password are entered the login page that closes
>> and a form that is unbound and
>[quoted text clipped - 18 lines]
>>>>>>> TIA
>>>>>>> Gerald

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200609/1

Re: Combo Box Columns
"Duane Hookom" <DuaneAtNoSpanHookomDotNet> 05.09.2006 18:28:04
If you want to reference a control's value from the form, you must leave it
open. You can make it invisible by setting the form's visible property to
False.

--
Duane Hookom
MS Access MVP

"gjameson via AccessMonster.com" <u21717[ at ]uwe> wrote in message
news:65d83cdb9b8ea[ at ]uwe...
[Quoted Text]
> Closing it when I goto the other form. Should I leave it open?
>
> Duane Hookom wrote:
>>Are you leaving the Splash form open?
>>
>>> Once the right user id and password are entered the login page that
>>> closes
>>> and a form that is unbound and
>>[quoted text clipped - 18 lines]
>>>>>>>> TIA
>>>>>>>> Gerald
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200609/1
>


Re: Combo Box Columns
"gjameson via AccessMonster.com" <u21717[ at ]uwe> 05.09.2006 19:59:24
I left it open and it is still asking for that value.

Duane Hookom wrote:
[Quoted Text]
>If you want to reference a control's value from the form, you must leave it
>open. You can make it invisible by setting the form's visible property to
>False.
>
>> Closing it when I goto the other form. Should I leave it open?
>>
>[quoted text clipped - 6 lines]
>>>>>>>>> TIA
>>>>>>>>> Gerald

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200609/1

Re: Combo Box Columns
"gjameson via AccessMonster.com" <u21717[ at ]uwe> 05.09.2006 20:39:03
Thanks for your help Duane. I must stress the importance of using the right
fields in 'Link Child and Master fields'. :) This is where my typo was. I was
still referencing the wrong field in one. Works great now.

gjameson wrote:
[Quoted Text]
>I left it open and it is still asking for that value.
>
>>If you want to reference a control's value from the form, you must leave it
>>open. You can make it invisible by setting the form's visible property to
>[quoted text clipped - 5 lines]
>>>>>>>>>> TIA
>>>>>>>>>> Gerald

--
Message posted via http://www.accessmonster.com

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net