Mpaull
|
Posted: 01/08/2002, 3:21 PM |
|
I need help I'm trying to do the following. On a record insert I want to insert multiple fields info based on the response given in one field. for example the user picks a zip code from a list box that gets it's info from a area table that contains zip city state. I want enter into the adresses table not only the zip but the city and state that correspond from the area table as well. It's access DB and I'm using ASP with Templates.
Help!!!!
|
|
|
Ken Hardwick
|
Posted: 01/08/2002, 4:12 PM |
|
Mpaull,
1)Add City and State to your form as Hidden fields.
2)In "Before Insert" event...use the lookup function...
' Lookup field in the database based on provided criteria
' Input: Table (Table), Field Name (fName), criteria (sWhere)
'-------------------------------
'function DLookUp(Table, fName, sWhere)
as follows...
ZipWhere = " zip = " & toSQL(fldZip,"Text")
fldCity = dLookup("AreaTable","City",ZipWhere)
fldState = dLookup("AreaTable","State",ZipWhere)
|
|
|
Mpaull
|
Posted: 01/09/2002, 1:34 PM |
|
It worked thanks alot!
|
|
|
|