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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update A Table Access 2003 With A String Value

Status
Not open for further replies.

pccarrick

IS-IT--Management
May 11, 2009
15
DE
Hi i have been going round in circles and unable to find out how to assign a string which i have by clicking a command button to assign as a multi table in access 2003. I know if i had this in 2007 it would not be a problem, unfortunatly i don't have this. My main problem is assigning th string value to the table. Below is the code to get the information in a string from a multi select combi box. Any help would be much appreciated.

Thanks


Private Sub Command437_Click()

Dim varItem As Variant
Dim strList As String

For Each varItem In List434.ItemsSelected
strList = strList & List434.Column(1, varItem) & ", "
Next varItem
strList = Left(strList, Len(strList) - 2)

MsgBox strList


End Sub
 
We need to know more about your table structure.

The basic rules of normalization suggest you shouldn't store multiple values in a single field. I would create a related table and each item selected should create its own record in the related table.

If you are set on using a list box rather than a continuous subform, you will need to either use some recordset code or SQL statements.


Duane
Hook'D on Access
MS Access MVP
 
Hi thanks for the response, i am quite happy to do what i need to so that i can get this to work. I am quite new to this so if you could give me a example of what i need to do i would be very thankful. Just have have not used these options yet in my limited time with Access.

Thanks again
 
You need to provide some additional information. What do you mean by "multi table"? What are your significant table and field names? Please type some typical record values of the significant fields.

Duane
Hook'D on Access
MS Access MVP
 
What i am trying to do is select a number of projects from a table (hence the mutli select list box) and assign to a suppliers contact details. So when i open up my form with the contact details i can see what projects they have worked on. I can get the information pushed to the screen so i can see that string value, my problem is how can i store and disply this information on the current page. If required i could email you a screen shot of the form i am using.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top