Sounds like you are trying to do something like this...
if len(nz(fieldname1),"") = 0 or len(nz(fieldname2),"") = 0 or len(nz(fieldname3),"") = 0 or len(nz(fieldname4),"") = 0 then
msgbox(....)
else
execute query
endif
Microsoft database engine could not find the object ""...." when running mde
I was having a strange issue - and was writing up this message, when I figured out the problem. just wanted to share in case anyone else has a similiar one:
I am using timers to close all forms except the login...
I do not use Access security/permissions. Instead I created the user table that gets updated/accessed via the a special user form, (to add users, set them as inactive, reset passwords, set them up as admin), the login screen and the password update screen. I also have a routine in place for...
Well Banana - :) I guess the user is just going to have to see those messages - I've spent enough time on this - I see what you are saying, but I don't want to clutter up my program with too many fixes... Thanks for the commentary - its been fun...
With regards to the Errors collection: current help states:
When a ADO or DAO error occurs, the Visual Basic Err object contains the error number for the first object in the Errors collection. To determine whether additional ADO or DAO errors have occurred, check the Errors collection. The...
Also - on the form that the user uses to change the password, the date they changed it gets stored in the user table.... so it then is available to be viewed & compared, in the login screen, as indicated in the code I presented...
Well - besides the Q. of wether the ODBC- call failed is itself an error, I guess I was assuming that Access would pass the SQL error through - I do see the SQL errors along with this ODBC error. So still don't know if I am thinking about this correctly when I view this as getting 1 ODBC error...
PeeTee:
I have the following code that I use...
dtePasswordExpires = Me.cboUser.Column(8)
If (DateAdd("d", 186, (dtePasswordExpires)) < Date) Then
If (DateAdd("d", 200, (dtePasswordExpires)) < Date) Then
MsgBox "Your Password has been used for over 6 months and is now...
Thanks Vonnie - I do have error capturing routine in place under the form.error event. I tried editing it with the info. you provided. However, I am not sure it would ever get past 1st case on error# 3146? and in this case, with duplication being the cause, the error msg wasn't appropriate for...
I have Access 2003 linked to SQL Server 2005, - used to have Access backend and now must move to SQL Server . I am testing what happens if errors occur - When testing by deliberately creating a duplicate record in my form, this error came up ODBC Call Failed (# 3146)- and, it also includes a...
I discovered the fix: instead of capturing or handling the error in the beforeupdate event, (as I could do with an Access backend), I needed to capture it in the form error event, which would occur before the message appeared. Thanks for your commentary - it all helps.
Thank you for the time you are putting into this - I very much appreciate it. What is this 'rule' you are referring to and how could SQL Server enforce it before any update has been applied? - I'm not even getting to BeforeUpdate for the FIELD, let alone the FORM. Also, it appears that the...
Unfortunately, the error msg I get displays BEFORE the "BeforeUpdate' event, and there is no other event it could go to that I am aware of after updating the field - sorry, I forgot to mention this. Also, this HAD been working when I had an Access backend (with defaults both in form and in...
I have recently moved a DB over to SQL Server - still using Access as front-end (linked tables). 2 fields having trouble with in SQL Server are both defined to not accept null values and have default values defined as such: ie ('No Donor'). If I remove a value from one of these fields via my...