Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Runtime Error with MS Access 2000 Runtime not with Full Version

97 and 2000

Runtime Error with MS Access 2000 Runtime not with Full Version

by  Petercl  Posted    (Edited  )
The AfterUpdate event of a TextBox causes MS Access 2000 Runtime to crash, but running the same database from MS Access 2000 full version does not.

The AfterUpdate event contains the following code;

Private Sub TenderDue_AfterUpdate()
Dim SearchString, SearchChar As String
Dim Mypos, MyNumber As Integer

' Tender Valid is a combo box value list
' First 2 or 3 digits are a number
SearchString = Me.[TendValid]
' Set Variable to Space
SearchChar = " "
' Set Design Due date to Tender due date less 7 days
Me.[Design_Due] = Me.[TenderDue] - 7
'Locate position of space in Tender Valid
Mypos = InStr(1, SearchString, SearchChar, vbTextCompare)
'Extract Number from String
MyNumber = Mid(SearchString, 1, Mypos - 1)
' Set Date of Validity to Tender Due + number of Days
Me.[ValidDate] = Me.[TenderDue] + MyNumber

End Sub

It would appear that at the time the Runtime User triggered the AfterUpdate event the Design_Due control was locked. This seems to be ignored by the Full Version but causes the Runtime version to crash. If anyone can confirm this of course.


Regards
Peter


Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top