On Thu, 3 Jun 2004 13:38:45 -0600, in microsoft.public.access.forms you wrote:
Hi Albert
Please below comments
Hum...don't recall getting the email! (did it bounce back on you?).
No It did not
===============================
The above is quite a wide question. As "how" do you want to find and display
records in that list?
Ok to explain in more detail
I have a list box
It gets the data from
Row Source Type "table/Query
Row Source is
SELECT DISTINCTROW customers.Surname, customers.Firstname FROM customers ORDER BY customers.Surname;
the event
after update [Event Procedure]
the Event Procedure code
=====================================
code start
Sub List40_AfterUpdate()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[Surname] = '" & Me![List40] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
========================================
So All i do from the list box is left mouse click on one of the names and it puts that name in all the fields on the open form
frmcustomers.
No Problem all works fine
NOW what I have been trying to do is make that list box a MULTI list box
So I can select the first name then hold ctrl key and select anymore in that list box I want
So I could select smith,jones,brown etc
Then press a button merge selected
This is where I'm having trouble
===========================================================
Will the person look, find, slice/dice and "THEN" decide to add to the merge
list?
As above select from the list box
==============================
So, really, it depends on how many names you have to display. (you can't
display 5000 names in a listbox, and have the user plow throw that many
names..and then select a few records?
Yes I understand the above
BUT this will have no more than 500
============================================
So, the first question is how you will display those names?
A form frmcustomers which will have the list box on it
================================================
Also, how many names can/will you have in the list?
It will show all names in the table "tblcustomers" Like Surname.Firstname BUT as I say max of 500
===========================================================
I would suggest you simply add a [x] check box field to the screen. You then
can lookup and find the record you want, click on the "sendMailing" check
box. You do this for as many records as you need to select.
Yes done that and all works fine BUT
I do not think I could relies on the customer to take the ticks out after they have put them in
)
==================================================================
You see, the real issue is "how" do you plan to find those records? (and, no
doubt you have provided and worked very hard to use a good means for users
to find records now..right?
Ha Ha Ha you bet been going round in circles
========================================
(after all, how can they effectively use your
application if they don't have a way to find, and lookup a name now). So,
buy adding a simply check box field called "MyMailing", then you can use
your EXISTING means to find a record, and then check the box.
Yes that is very good way BUT as I say above I think they would gorget to take out the dam ticks afterwards
=========================================================
You then can make a simply button on a form that you launch at the end of
the day (or AFTER you have found and checked all the names to mail to).
You then go:
dim strSql as string
strSql = "select * from tblCustomers where MailTo = true"
MergeAllWord (strSql)
Yes all worked fine
=================================
that is all you need. However, after you are done the above, you then need
to "clear" all the check boxes. You would ONLY want to check the boxes AFTER
you ensure all the letter get printed, and paper did not jam etc.
The code to re-set all the checkboxes could be a simply button, and the code
could be:
currentdb.Execute "update tblCustomers set MailTo = false"
Ha Ha Ha I had a problem with the above it kept coming back variable not defined
so I put
DoCmd.RunSql "update tblCustomers set MailTo = false", -1
It seams to work ok
===============================================
and, for some ideas on searching/looking for names...you can read the
following:
http://www.attcanada.net/~kallal.msn/Search/index.html
Yes very good page learnt a lot from that thank you
As always, any and all help is greatly appreciated.
Thank you in advance.
John
PLEASE NOTE REAL EMAIL
(e-mail address removed)