How to put the query-results into one text field? (1 Viewer)

xytras

New member
Local time
Today, 03:10
Joined
Oct 5, 2005
Messages
9
HI!
Can Anyone help me with this?
I would like to put query results(one column) into one text field?
Is it possible that results could be in such textfield separated?
Thanks in Advance
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 11:10
Joined
Jul 9, 2003
Messages
16,304
xytras said:
HI!
Can Anyone help me with this?
I would like to put query results(one column) into one text field?
Is it possible that results could be in such textfield separated?
Thanks in Advance

There is a thread here that will hopefully provide you with some useful information.
 

xytras

New member
Local time
Today, 03:10
Joined
Oct 5, 2005
Messages
9
Uncle Gizmo said:
There is a thread here that will hopefully provide you with some useful information.

Thank's but in fact i'm working on my "sending mail through access" problem and i need to fill textfiield with email addresses from the table with a query

Maybe i'm did not understand thread link

Thank's Again!
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 11:10
Joined
Jul 9, 2003
Messages
16,304
xytras said:
Thank's but in fact i'm working on my "sending mail through access"
Are you really! Well I didn't know that!

xytras said:
Maybe i'm did not understand thread link
Thank's Again!

I don't really know who understands what. I thought I understood your question, which read to me, as that you had a list of data in a table, and from your second post, this is a list of e-mail addresses.

I understood that you wanted this list of data, (e-mail addresses listed in a table as one e-mail address per row) I took it that you meant that you wanted to place this data into a single text field.

If that is the case, then the attached database to that thread I pointed you to has such a facility.

xytras said:
Is it possible that results could be in such textfield separated?
Yes, the example I pointed you to separates each piece of text with a comma, which you could easily change to any other delimiter that you fancied.

If I have misunderstood your question then please accept my apologies for reading between the lines and posting the wrong answer. In future if I am not sure what you are asking I will not reply.

If you wish to have a better look at the attached database, and come back with some more questions on how to adapt it to your use I will only be to please to help.
 

xytras

New member
Local time
Today, 03:10
Joined
Oct 5, 2005
Messages
9
Uncle Gizmo said:
If I have misunderstood your question then please accept my apologies for reading between the lines and posting the wrong answer. In future if I am not sure what you are asking I will not reply.

If you wish to have a better look at the attached database, and come back with some more questions on how to adapt it to your use I will only be to please to help.

My apoligies. It's my fault. I'm just not good enough. I have question to Your DB. I'm using only one table called contact and single textfield called "to"
Is it possible to put simple Your "Public Function fConList(intBatchNo As Integer, strSerialNo As String)" into some click button that will fill that textfield with the results. How can i use some external attached query without puting sql instruction into code? Or is it neccessary?

Thank's and sorry for being not clear
 

Uncle Gizmo

Nifty Access Guy
Staff member
Local time
Today, 11:10
Joined
Jul 9, 2003
Messages
16,304
I have attached another zip file, it is not quite what you want as it is not based on a query. I think it is possible to base it on a query, however I am not familiar with that method, as this method I use, is more flexible, and basically it uses a query anyway, only in that the query is in its text form.

If you open up the query in the attached zip file the query name is "qryAsUsedInModule" if you open it in Design view, and then select SQL view, you will see the query written out in a text statement:

SELECT Contact.To
FROM Contact;

If you look in the module you will see this line:

strSQL = "SELECT Contact.To FROM Contact"

which is exactly the same query.

then if you look in the module code, you will see where it references the "to" field, and uses it to build up the string for the text box.
 

Attachments

  • FieldDataHorizontalyInTxtBox.zip
    14.5 KB · Views: 294

Users who are viewing this thread

Top Bottom