Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
jpiscit1
Posting Yak Master
130 Posts |
Posted - 2004-07-26 : 10:29:46
|
I have a Access Database that is linked to a SQL table on a MS SQL server. Im dealing with two tables for this question. dbo_tbl_3PMProductCodesANDdbo_tbl_CalibSampleRpt3The table dbo_tbl_3PMProductCodes has two fields in it. dbo_tbl_3PMProductCodes.Product CodeANDdbo_tbl_3PMProductCodes.Product DescriptionThe other table (dbo_tbl_CalibSampleRpt3) has many fields in it. Two of the fields are Product Code and Product Description. I have a form for operators to add, delete, update, etc. info into the dbo_tbl_CalibSampleRpt3 table. I am trying to set up a combo box that allows them to look up the Product Code and have it automatically update the Product Code and Product Description fields in the dbo_tbl_CalibSampleRpt3 table. The Product Code and Description would be looked up in dbo_tbl_3PMProductCodes table and stored in the dbo_tbl_CalibSampleRpt3 table.I have an After Update event procedure on the combo box as such:Me!Combo55.Column(1) = Me!Text30.TextWhere column 1 is the dbo_tbl_3PMProductCodes.Product Description field and Text30 is linked to the dbo_tbl_CalibSampleRpt3.Product Description field. The combo looks up the values ok and stores the one value to dbo_tbl_CalibSampleRpt3.Product Code field. But I get the following error and the description field is not being updated??"The expression After Update you entered as the event property setting produced the following error: A problem occured while Microsoft Access was communicating with the OLE server or ActiveX control."Does anyone know what I might be doing wrong? I am simply trying to update a field description (name) based on what product code is selected...using a look up table.Thanks,john |
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2004-07-26 : 17:09:55
|
What exactly are you trying to update here? The values in the combo list? Why not just issue a requery? And it sounds like you're saying you have both ProductCode and ProductDescription stored in both tables. Why not store the Description only in the ProductCodes table and whenever you need to know what it is you can look it up based on the Code?And while I'm here, I implore you to do whatever you can to get rid of the spaces in field names.-----------------------------------------------------Words of Wisdom from AjarnMark, owner of Infoneering |
 |
|
|
|
|