A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

accessing columns in a listbox



 
 
Thread Tools Display Modes
  #1  
Old April 5th, 2008, 12:35 PM posted to microsoft.public.access.forms
Dsperry101 via AccessMonster.com
external usenet poster
 
Posts: 44
Default accessing columns in a listbox

Hello,
I am working with Access 2000 . I have a listbox with 2 columns . The
first column is populated from a query. I want to take the values in the
first column and do a query with each item and enter the result in the second
column . The listbox is lstNames with 2 columns . How do I insert values in
the second column ??????

--
Danny C. Sperry

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200804/1

  #2  
Old April 5th, 2008, 12:52 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default accessing columns in a listbox

That sounds like a very unusual requirement.

Can you not just create a join (or joins) so that one query returns both
columns?

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


"Dsperry101 via AccessMonster.com" u24149@uwe wrote in message
news:8238b52fe76cb@uwe...
Hello,
I am working with Access 2000 . I have a listbox with 2 columns . The
first column is populated from a query. I want to take the values in the
first column and do a query with each item and enter the result in the
second
column . The listbox is lstNames with 2 columns . How do I insert values
in
the second column ??????

--
Danny C. Sperry

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200804/1



  #3  
Old April 5th, 2008, 01:56 PM posted to microsoft.public.access.forms
Dsperry101 via AccessMonster.com
external usenet poster
 
Posts: 44
Default accessing columns in a listbox

The reason I was doing this was that Access doesn't have a count distinct. If
you could suggest a way to do this that would be great.

I have a work order database with table tblNewMwo. When an individual work
order is done a date complete is inserted into [Date_Complete] and an email
is sent to the [Requestor]. When the requestor responds to the email the
system puts the text "Signed off" into the field [Sign_Off_By_Request]. I
want to send an email to the complete but not signed off [Requestor].
I get a list of requestors with
SELECT DISTINCT tblNewMwo.Requestor AS cntrequests
FROM tblNewMwo
WHERE (((tblNewMwo.Date_Complete)"") AND ((tblNewMwo.Sign_Off_by_Request)
=""));

access 2000 doesn't have a select distinct but in the form I get each
distinct requestor and count the "unsigned off " with

DCount("[Requestor]", "tblNewMwo", "[Requestor] = '" & teststr & _
"' AND [Sign_Off_By_Request] LIKE '' AND [Date_Complete]
'' ")
teststr is the Requestors from the first query
Thanks ahead of reply

Douglas J. Steele wrote:
That sounds like a very unusual requirement.

Can you not just create a join (or joins) so that one query returns both
columns?

Hello,
I am working with Access 2000 . I have a listbox with 2 columns . The

[quoted text clipped - 4 lines]
in
the second column ??????


--
Danny C. Sperry

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200804/1

  #4  
Old April 5th, 2008, 03:04 PM posted to microsoft.public.access.forms
jan
external usenet poster
 
Posts: 1
Default accessing columns in a listbox


"Dsperry101 via AccessMonster.com" u24149@uwe schreef in bericht
news:8238b52fe76cb@uwe...
Hello,
I am working with Access 2000 . I have a listbox with 2 columns . The
first column is populated from a query. I want to take the values in the
first column and do a query with each item and enter the result in the
second
column . The listbox is lstNames with 2 columns . How do I insert values
in
the second column ??????

--
Danny C. Sperry

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200804/1


  #5  
Old April 5th, 2008, 03:19 PM posted to microsoft.public.access.forms
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default accessing columns in a listbox

SELECT Requestor, Count(*) AS cntrequests
FROM tblNewMwo
WHERE (Date_Complete"") AND (Sign_Off_by_Request ="")
GROUP BY Requestor


Just a couple of comments. It would appear that both Date_Complete and
SIgn_Off_by_Request fields are text fields with their Required property set
to True (and Allow Zero Length set to True). Personally, I think you'd be
far better off with Date_Complete being a Date/Time field, and both fields
having their Required property set to False so that they can contain Nulls
when there isn't a value.

You'd then use

SELECT Requestor, Count(*) AS cntrequests
FROM tblNewMwo
WHERE (Date_Complete IS NOT NULL) AND (Sign_Off_by_Request IS NULL)
GROUP BY Requestor

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


"Dsperry101 via AccessMonster.com" u24149@uwe wrote in message
news:82396b67f3dbd@uwe...
The reason I was doing this was that Access doesn't have a count distinct.
If
you could suggest a way to do this that would be great.

I have a work order database with table tblNewMwo. When an individual work
order is done a date complete is inserted into [Date_Complete] and an
email
is sent to the [Requestor]. When the requestor responds to the email the
system puts the text "Signed off" into the field [Sign_Off_By_Request]. I
want to send an email to the complete but not signed off [Requestor].
I get a list of requestors with
SELECT DISTINCT tblNewMwo.Requestor AS cntrequests
FROM tblNewMwo
WHERE (((tblNewMwo.Date_Complete)"") AND
((tblNewMwo.Sign_Off_by_Request)
=""));

access 2000 doesn't have a select distinct but in the form I get each
distinct requestor and count the "unsigned off " with

DCount("[Requestor]", "tblNewMwo", "[Requestor] = '" & teststr & _
"' AND [Sign_Off_By_Request] LIKE '' AND
[Date_Complete]
'' ")
teststr is the Requestors from the first query
Thanks ahead of reply

Douglas J. Steele wrote:
That sounds like a very unusual requirement.

Can you not just create a join (or joins) so that one query returns both
columns?

Hello,
I am working with Access 2000 . I have a listbox with 2 columns .
The

[quoted text clipped - 4 lines]
in
the second column ??????


--
Danny C. Sperry

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200804/1



  #6  
Old April 7th, 2008, 11:08 AM posted to microsoft.public.access.forms
Dsperry101 via AccessMonster.com
external usenet poster
 
Posts: 44
Default accessing columns in a listbox

Doug,

Thanks ! The query worked great .


Douglas J. Steele wrote:
SELECT Requestor, Count(*) AS cntrequests
FROM tblNewMwo
WHERE (Date_Complete"") AND (Sign_Off_by_Request ="")
GROUP BY Requestor

Just a couple of comments. It would appear that both Date_Complete and
SIgn_Off_by_Request fields are text fields with their Required property set
to True (and Allow Zero Length set to True). Personally, I think you'd be
far better off with Date_Complete being a Date/Time field, and both fields
having their Required property set to False so that they can contain Nulls
when there isn't a value.

You'd then use

SELECT Requestor, Count(*) AS cntrequests
FROM tblNewMwo
WHERE (Date_Complete IS NOT NULL) AND (Sign_Off_by_Request IS NULL)
GROUP BY Requestor

The reason I was doing this was that Access doesn't have a count distinct.
If

[quoted text clipped - 34 lines]
in
the second column ??????


--
Danny C. Sperry

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200804/1

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:29 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.