FLL
Aug 13th, 2000, 12:15 AM
Hello, again. I have a problem that I have not been able to reslove, and I was hoping that someone with a knowledge of Access and DB's could give me some advise:
I have a form that adds a record to an existing recordset (grsCustomers) in an Access database. I have written smaller projects for an SQL database, but can't get this one to work using Access. I have 17 fields in all, 14 of them which I don't want to deem as necessary...I want to allow null values, but I think this is the problem I am running into with Access. I have the field set to "Allow Nulls" in Access, but it keeps giving me errors:
Private Sub cmdAddNew_Click()
LoadRecord
End Sub
Private Sub LoadRecord()
With grsCustomers
!FirstName = txtFirst.Text
!MiddleInitial = txtMI.Text
!LastName = txtLast.Text
!StreetNumber = txtStNum.Text
!Direction = txtDirection.Text
!Street = txtStreet.Text
'etc...
'etc...
End With
End Sub
I keep getting errors associated with trying to add null fields to the database. I have the property "Accept Null Values" (it is titled something like that in the design view of Access) to True or Yes, but I keep getting the error. Any suggestions? This is not an issue with an MS SQL database...is there a certain format for putting in a null value into Access?
could I get a coding example similar to what I have given as a guide?
Thanks so much!
FLL
I have a form that adds a record to an existing recordset (grsCustomers) in an Access database. I have written smaller projects for an SQL database, but can't get this one to work using Access. I have 17 fields in all, 14 of them which I don't want to deem as necessary...I want to allow null values, but I think this is the problem I am running into with Access. I have the field set to "Allow Nulls" in Access, but it keeps giving me errors:
Private Sub cmdAddNew_Click()
LoadRecord
End Sub
Private Sub LoadRecord()
With grsCustomers
!FirstName = txtFirst.Text
!MiddleInitial = txtMI.Text
!LastName = txtLast.Text
!StreetNumber = txtStNum.Text
!Direction = txtDirection.Text
!Street = txtStreet.Text
'etc...
'etc...
End With
End Sub
I keep getting errors associated with trying to add null fields to the database. I have the property "Accept Null Values" (it is titled something like that in the design view of Access) to True or Yes, but I keep getting the error. Any suggestions? This is not an issue with an MS SQL database...is there a certain format for putting in a null value into Access?
could I get a coding example similar to what I have given as a guide?
Thanks so much!
FLL