code to accept null values in recordset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Creating a new database. Working on the employees form. The user selects
from a combo box the name/ID, then the code creates a recordset to pull back
the rest of the data. Everything works fine except when there is a cell with
no values, ie middle name, then the code drops out. I'm using the basic
approach presented in the developers handbooks. Does someone have some code
that would allow a recordset to accept null values. Simply selecting null
values okay in the database properties is not good enough.

I'd add the code here, but it gets pretty lengthy.
 
Hi,
Exactly where are you getting the error?
If your rs contains NULL values, you'll have to account for that by checking...

If IsNull(rs!whatever) Then
 
The operation just stops, there is no error given. For instance, I have a
Vendor form, that works now and uses the same basic code, if I remove the POC
from the vendor table, the form will not return values. Even having a
default doesn't work, the cell must have a value.The work around was to enter
"none" as a value for POC. However, you can see that this would not work
for 1100 employees.
 
Hi,
This is really hard to troubleshoot having no idea of your setup or code.
Is your rs created from a query? Is it possible the query is returning no records?
What operation just stops?
 
Back
Top