Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / SQL Server / ADP / June 2004

Tip: Looking for answers? Try searching our database.

Runtime Error 2107

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
J Arty - 24 Jun 2004 18:21 GMT
Hi all,

I have a form with a subform.... once the user celect the client, he then
goes to the subform and add qty and select a check box to order...
when the user selects the check box the following code is done:

DoCmd.SetWarnings False
Me.OrderID.Value = Forms!OrderParts!OrderID
DoCmd.DoMenuItem acFormBar, acFile, acSaveRecord, , acMenuVer70
'RunCommand acCmdSaveRecord
Call ChangeSQL
Exit Sub

Private Function ChangeSQL()
Dim SupID As Integer
SupID = Forms!OrderParts!SupplierID

Forms!OrderParts!orderpartssubform.Form.RecordSource = "SELECT Orderid,
SupplierID," _
   & "ModelID, ProductID, Description, OrderQty, Price, CONVERT(money,
Price * OrderQty) " _
   & "AS ExtPrice, Date, Reorder FROM CommandeE" _
   & " WHERE (OrderID = N' ' OR OrderID is null  OR OrderID = '" _
   & Forms!OrderParts!OrderID & "') AND SupplierID = '" _
   & SupID & "'"
End Function

but when it gets to the part where i change the recordsource I get this
error : "Run-Time error '2107':
the value you entered doesn't meet the validation rule defined for the field
or control", if I debug and press f5
it run ok.

I am saving the record before I change the record souce... so I should not
get this error, but I am..

I can use the code "'RunCommand acCmdSaveRecord" it tells me the save record
is not available

any help would be greatly appreciated
J Arty - 24 Jun 2004 18:40 GMT
I can't use the code "'RunCommand acCmdSaveRecord" it tells me the save
record
> is not available

> Hi all,
>
[quoted text clipped - 36 lines]
>
> any help would be greatly appreciated
J Arty - 24 Jun 2004 19:44 GMT
never mind, I put the "Call ChangeSQL" in the after update of the OrderID
witch is my key field and it works

> I can't use the code "'RunCommand acCmdSaveRecord" it tells me the save
> record
[quoted text clipped - 42 lines]
> >
> > any help would be greatly appreciated
J Arty - 24 Jun 2004 19:55 GMT
No was wrong did not work if anyone has an idea please let me know ran out
of ideas myself

> never mind, I put the "Call ChangeSQL" in the after update of the OrderID
> witch is my key field and it works
[quoted text clipped - 47 lines]
> > >
> > > any help would be greatly appreciated
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.