Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check box to transfer name

Status
Not open for further replies.

Ali29J

Technical User
May 13, 2004
203
GB
Hi All

I have a main form "frmContactReport" with a text box called "Attendees".

On click another form opens and it displays all contacts relevent to the current customer (master form with a continuous subform). what i would like to do is check next to the relevent customer contacts which in turn will add the contacts to the attendees text box, for example:

selecting each name will populate the text box as follows:

Fred Bloggs;Tony Blair;Fred Flintstone

Could any one help me to achieve this?

Tried this and its not working:

strSQL = "INSERT INTO CustomerReport (Attendees)
SELECT (forms!frmContactAdd!CustomerID.Value), CustomerContact.Name
FROM CustomerContact
where (((CustomerContact.CustomerID)=[forms]![frmContactAdd]![CustomerID])
AND ((CustomerContact.AddContact)=True))"
DoCmd.RunSQL strSQL

ALi

 
Ok So it seems i ve over complicated this, i just used simple command button, with the following code

Forms!frmContactReport!Attendees.Value = Forms!FrmContactAdd!frmContactAddSub!Name.Value

So, just minor alteration needed, how do ensure it adds the name to the box rather than completely replacing the existing value, also need to separate with semi colon ;

 
Something like:

Forms!frmContactReport!Attendees.Value = Forms!frmContactReport!Attendees.Value & ";" & Forms!FrmContactAdd!frmContactAddSub!Name.Value


?????

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB/Access Programmer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top