code to accept null values in recordset

G

geomike

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.
 
D

Dan Artuso

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
 
G

geomike

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.
 
D

Dan Artuso

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top