Still in Access.
Here is the code:
If .RecordCount = 1 Then
.MoveFirst
If IsEmpty(f!ISBN_ID.Value) = False Then
If IsEmpty(f!book_ID.Value) = False Then
If IsEmpty(f!IDNum.Value) = False Then
If IsEmpty(f!Publish_Date.Value) = False Then
If f!title_Qty > 0 Then
If f!bookPrice > 0 Then
Do Until .EOF
With out
.AddNew
!ISBN_ID = f!ISBN_ID.Value
!book_ID = f!book_ID.Value
!SEQ_NBR = 1
!ID NUM= f!IDNum.Value
!Publish_DATE = f!publish_Date.Value
!title_QTY = f!title_Qty.Value
!QTY_UOM = "PCS"
!Title_PRICE = f!title_price.Value
!Comment_1 = cmt!comment_1
!comment_2 = cmt!comment_2
!book_DESC = f!book_Desc.Value
.Update
End With
.MoveNext
Loop
End If
End If
End If
End If
End If
End If
Do Until .EOF
I get an "Data type conversion error." if I leave the date field blank on my form. Oddly, the error does not happen if I leave the date field blank the first time I enter my book information.
Two questions: 1. Why does my first entry work when I leave the date field blank? 2. How do I resolve the errror?
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.