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 / Forms Programming / May 2008

Tip: Looking for answers? Try searching our database.

Debugging a record in a continuous form using oncurrent event

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jack - 23 May 2008 15:24 GMT
Hi,
I have a search form. The form receives search parameters. On the search
output it gives records in a continuous form.(The search and the output is a
single form) Now I have added code in the oncurrent event of the form. I have
put a breakpoint on the new code. As soon as I am opening this form the form
is going in the debug mode. It does not allow me to put values in the search
paramter and get the required output records, go the current record and step
through the code. How does one step through code put in oncurrent event in a
scenario like this? Any help is appreciated. Thanks

I intend to step through the following code:

Dim myDB As Database
Dim myRS As Recordset
Dim strSql As String

strSql = "SELECT Count(*) AS RecordCount FROM   dbo_PWOProject WHERE Prefix
= '" & Me.Prefix & "' AND Number = '" & Me.Number & "' AND Revision = '" &
Me.Revision & "' AND PriceRevision = '" & Me.PriceRevision & "' And InUseBy =
""IsNull"""

Set myDB = CurrentDb()
Set myRS = myDB.OpenRecordset(strSql, dbOpenDynaset)

numrows = myRS(0)
myRS.Close

If numrows < 1 Then
Me.QuoteStatus.Locked = True
Me.BFTStatus.Locked = True
Me.MarkedForDelete.Locked = True
End If
Jeff Boyce - 23 May 2008 17:02 GMT
Jack

I'm not following...

If you want to use a breakpoint to step through the code that fires after
you have entered search terms and told the form to do the search, wouldn't
you want the breakpoint in the code that runs when you tell the form to
search (e.g., a command button)?

What am I missing?

Regards

Jeff Boyce
Microsoft Office/Access MVP

> Hi,
> I have a search form. The form receives search parameters. On the search
[quoted text clipped - 36 lines]
> Me.MarkedForDelete.Locked = True
> End If
Jack - 23 May 2008 17:38 GMT
Thanks Jeff. I could solve the problem by putting debug.print in the code and
check to see how the variable values are changing from immediate window. With
this approach I did not have to put the breakpoint.

> Jack
>
[quoted text clipped - 52 lines]
> > Me.MarkedForDelete.Locked = True
> > End If
Jan Baird - 27 May 2008 20:51 GMT
Jan Baird is out of the country until September 20.   Every effort will be
made to respond to messages, but please be patient.
 
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.