By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,696 Members | 1,607 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,696 IT Pros & Developers. It's quick & easy.

Strange one: A2K2 wont recognize break points

P: n/a
I have some code that was working a minute ago, but not it's not working and
it's not recognizing the break points I've set, before or after the problem
area.

Here's a snippet of the code...

Private Sub MoveDb_Click()
1 On Error GoTo cmdMoveDb_Err
2 Dim strLocation As String
3 Dim strTempFile As String
4
5 strLocation = genFileDialog("Move the data file to a destination folder",
"mdb", False, Dir(txtRecorded))
6
7 If MsgBox("Are you sure you want to move this file " & vbQuestion +
vbYesNo, "Move File?") = vbYes Then
8
9 strTempFile = txtOriginalFilePath & txtOriginalFileName &
Format(Now, "yyyymmddhhnnss")
10
11 CloseObjects ' This is a separate function that closes all forms and
reports
The code won't run past line 7 whether you choose Yes or No. The breakpoint
doesn't appear at line 5 (or any other line for that matter). Not sure what
could be causing this, but it's the first time I've ever run into it.

Any suggestions?

Thanks!

Dec 11 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Jozef wrote:
I have some code that was working a minute ago, but not it's not working and
it's not recognizing the break points I've set, before or after the problem
area.

Here's a snippet of the code...

Private Sub MoveDb_Click()
1 On Error GoTo cmdMoveDb_Err
2 Dim strLocation As String
3 Dim strTempFile As String
4
5 strLocation = genFileDialog("Move the data file to a destination folder",
"mdb", False, Dir(txtRecorded))
6
7 If MsgBox("Are you sure you want to move this file " & vbQuestion +
vbYesNo, "Move File?") = vbYes Then


Msgbox is comprised of 3 options; the message text, the codes that
determine which buttons/icons to display, and the title. You are
concatenating vbQuestion + vbYesNo to the message text and are using
"Move File" to determine the buttons. Why not place a comma between the
text and the codes.
Dec 11 '05 #2

P: n/a
On Sun, 11 Dec 2005 06:33:34 GMT, "Jozef" <me@you.com> wrote:
I have some code that was working a minute ago, but not it's not working and
it's not recognizing the break points I've set, before or after the problem
area.

Here's a snippet of the code...

Private Sub MoveDb_Click()
1 On Error GoTo cmdMoveDb_Err
2 Dim strLocation As String
3 Dim strTempFile As String
4
5 strLocation = genFileDialog("Move the data file to a destination folder",
"mdb", False, Dir(txtRecorded))
6
7 If MsgBox("Are you sure you want to move this file " & vbQuestion +
vbYesNo, "Move File?") = vbYes Then
8
9 strTempFile = txtOriginalFilePath & txtOriginalFileName &
Format(Now, "yyyymmddhhnnss")
10
11 CloseObjects ' This is a separate function that closes all forms and
reports
The code won't run past line 7 whether you choose Yes or No. The breakpoint
doesn't appear at line 5 (or any other line for that matter). Not sure what
could be causing this, but it's the first time I've ever run into it.

Any suggestions?

Thanks!


You are using & instead of a comma. Line 7 should be -

If MsgBox("Are you sure you want to move this file", vbQuestion +
vbYesNo, "Move File?") = vbYes Then
Wayne Gillespie
Gosford NSW Australia
Dec 11 '05 #3

P: n/a
Ooops, My mistake, the actual code does have a comma instead of a concat. I
just removed some of the extraneous material to keep it simple. The actual
code does use a comma instead of an ampersand. (my apologies for the
confusion).

"Wayne Gillespie" <be*****@NOhotmailSPAM.com.au> wrote in message
news:47********************************@4ax.com...
On Sun, 11 Dec 2005 06:33:34 GMT, "Jozef" <me@you.com> wrote:
I have some code that was working a minute ago, but not it's not working
and
it's not recognizing the break points I've set, before or after the
problem
area.

Here's a snippet of the code...

Private Sub MoveDb_Click()
1 On Error GoTo cmdMoveDb_Err
2 Dim strLocation As String
3 Dim strTempFile As String
4
5 strLocation = genFileDialog("Move the data file to a destination
folder",
"mdb", False, Dir(txtRecorded))
6
7 If MsgBox("Are you sure you want to move this file " & vbQuestion +
vbYesNo, "Move File?") = vbYes Then
8
9 strTempFile = txtOriginalFilePath & txtOriginalFileName &
Format(Now, "yyyymmddhhnnss")
10
11 CloseObjects ' This is a separate function that closes all forms
and
reports
The code won't run past line 7 whether you choose Yes or No. The
breakpoint
doesn't appear at line 5 (or any other line for that matter). Not sure
what
could be causing this, but it's the first time I've ever run into it.

Any suggestions?

Thanks!


You are using & instead of a comma. Line 7 should be -

If MsgBox("Are you sure you want to move this file", vbQuestion +
vbYesNo, "Move File?") = vbYes Then
Wayne Gillespie
Gosford NSW Australia

Dec 11 '05 #4

P: n/a
Jozef wrote in message <0hWmf.145987$S4.88549@edtnps84> :
Ooops, My mistake, the actual code does have a comma instead of a concat. I
just removed some of the extraneous material to keep it simple. The actual
code does use a comma instead of an ampersand. (my apologies for the
confusion).


The challenge still persists (no breakpoint)?

I'm not sure, but here's a go ...

Have you "played around" with some of the database options (startup?)
and toggled the allow special key property (which I think also might
toggle
the allowbreakintocode property)?

Try resetting the use access special keys option in Tools | Startup and
see if that alters anything.

If not, try something like the following

Dim db as dao.database
Set db = currentdb

with db
.Properties("AllowSpecialKeys") = true
.Properties("AllowBreakIntoCode") = true
end with

--
Roy-Vidar

Dec 11 '05 #5

P: n/a
DOH! Thanks Roy! It's always the little silly things....

I do appreciate your help, Thank You!

"RoyVidar" <ro*************@yahoo.no> wrote in message
news:mn***********************@yahoo.no...
Jozef wrote in message <0hWmf.145987$S4.88549@edtnps84> :
Ooops, My mistake, the actual code does have a comma instead of a concat.
I just removed some of the extraneous material to keep it simple. The
actual code does use a comma instead of an ampersand. (my apologies for
the confusion).


The challenge still persists (no breakpoint)?

I'm not sure, but here's a go ...

Have you "played around" with some of the database options (startup?)
and toggled the allow special key property (which I think also might
toggle
the allowbreakintocode property)?

Try resetting the use access special keys option in Tools | Startup and
see if that alters anything.

If not, try something like the following

Dim db as dao.database
Set db = currentdb

with db
.Properties("AllowSpecialKeys") = true
.Properties("AllowBreakIntoCode") = true
end with

--
Roy-Vidar

Dec 11 '05 #6

P: n/a
Jozef wrote in message <KSXmf.251420$ir4.160213@edtnps90> :
DOH! Thanks Roy! It's always the little silly things....

I do appreciate your help, Thank You!


You are welcome! Glad to help!

--
Roy-Vidar

Dec 11 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.