I have an app that I was running a single feature class update on.I was able to add points no problem.I then related a table to the feature classI added some code that will allow the user to add some data in some textboxes and then click a save button, this will then add the record to the related table (instead of using the bulky related table entry form)When I add the point now I get an error that the column cannot contain a null value.I assume that this is the field that being used as the primary key between the feature class and the related table???If I click OK to the error it goes away and allows me to continue. If I then look at the related table in the form I can see that there is no vlaue there for the primary key field....I then enter my data on the form and then click a save button...this prompts some code that sends a SQL statement and adds a record in the related table. This works fine....ALTHOUGH IF I click on a existing feature class point I do not get this error, even if there are no records in the related table...Any one have any thoughts as to what can be firing this error....which seems to only be fired when I add a new feature...It errors on the red below....what I am doin before the update is getting a varaible which was set on app open and finding the highest record value to create a Unique ID....The Update fails, ALTHOUGH the code still runs and returns the two values just mentioned to the form.I really dont knwo whats going on here......thanksTHanks
'....snip
Dim objRS1, objEFPageOneControls, objEditForm, objEFPageTwoControls, objSelLayer1
Set objSelLayer1 = Map.SelectionLayer
Set objRS1 = objSelLayer1.Records
objRS1.Bookmark = Map.SelectionBookmark
Set objEditForm = application.map.layers("Retaining_Walls").forms("EDITFORM")
Set objEFPageOneControls = objEditForm.Pages("page1").Controls
objEFPageOneControls("txtUniqueID").Value = MaxID2
Dim selectedUser
selectedUser = Application.UserProperties("LoggedInEmployee")
objEFPageOneControls("cbo_User").Value = selectedUser
objEFPageOneControls("cbo_User").Enabled = False
objEFPageOneControls("txtUniqueID").Enabled = False
objRS1.Update
Set objRS1 = Nothing
'....snip