i just imported some records into my table and now my form gives me a data type mismatch error. here is the code.
Private Sub find_it_AfterUpdate()
Dim customers As Recordset, sqltext
sqltext = "select * from [customers] where " _
& "[customer number]= " & Me![customer number]
Set customers = CurrentDb.OpenRecordset(sqltext)
Me![name] = customers![name]
Me![address1] = customers![address1]
Me![address2] = customers![address2]
Me![address3] = customers![address3]
Me![city] = customers![city]
Me![state] = customers![state]
Me![zip] = customers![zip]
Me![prepaid carrier] = customers![prepaid carrier]
Me![collect carrier] = customers![collect carrier]
Me![fax number] = customers![fax number]
DoCmd.OpenForm ("terms popup")
End Sub
it worked fine before. the only thing i changed was the data type in the zip and customer number fields. they were changed from number to text to allow the new data to be used.
Private Sub find_it_AfterUpdate()
Dim customers As Recordset, sqltext
sqltext = "select * from [customers] where " _
& "[customer number]= " & Me![customer number]
Set customers = CurrentDb.OpenRecordset(sqltext)
Me![name] = customers![name]
Me![address1] = customers![address1]
Me![address2] = customers![address2]
Me![address3] = customers![address3]
Me![city] = customers![city]
Me![state] = customers![state]
Me![zip] = customers![zip]
Me![prepaid carrier] = customers![prepaid carrier]
Me![collect carrier] = customers![collect carrier]
Me![fax number] = customers![fax number]
DoCmd.OpenForm ("terms popup")
End Sub
it worked fine before. the only thing i changed was the data type in the zip and customer number fields. they were changed from number to text to allow the new data to be used.