PDA

View Full Version : Help with an update table.


malhyp
05-05-2006, 06:29 PM
Hi there, I have been creating an update table. When the form calls the current information in the database, it calls up a number of the item relationship rather than the actual name.

Example: In the database there is a table called Countries. Australia is country number 5. The update form shows number 5 rather than the text Australia.

Can anyone suggest what is going wrong?

TA

Mally.

malhyp
05-08-2006, 11:53 PM
I just realised that the cell property in the Access database was set as a 'numeric' file. With that the form update recordset was also set to numeric. I have changed them both to 'text' and it seemed to now show the text "Australia" rather than its actual id number "1".

Now that this is working, we get the following error message.

Microsoft JET Database Engine error '80004005'
Type mismatch in expression.
/html/results-wholesale.asp, line 67

<%
Dim rsSearchResult
Dim rsSearchResult_numRows
Set rsSearchResult = Server.CreateObject("ADODB.Recordset")
rsSearchResult.ActiveConnection = MM_connSeek_STRING
rsSearchResult.Source = "SELECT SupplierName, Location, ShortDescription, TimberSpecies, CategoryTitle, Country FROM Query1 WHERE TimberSpecies LIKE '%" + Replace(rsSearchResult__MMColParam, "'", "''") + "%' AND CategoryTitle LIKE '%" + Replace(rsSearchResult__MMColParam2, "'", "''") + "%' AND Location LIKE '%" + Replace(rsSearchResult__MMColParam3, "'", "''") + "%' AND BusinessType LIKE '%" + Replace(rsSearchResult__MMColParam4, "'", "''") + "%' ORDER BY SupplierName"
rsSearchResult.CursorType = 0
rsSearchResult.CursorLocation = 2
rsSearchResult.LockType = 1
rsSearchResult.Open() <------------------- Line 67
rsSearchResult_numRows = 0
%>

Can anyone suggest why this is happening or what I should do?

Thanks

Mally.