Interumping continuous form

J

Jean-Paul

Hello,
I created a continuous form.
All records are displayed correctly but, every time a new record is
displayed I want the program to stop and ask a question before the new
record.

What command in the propertylist should I use for this purpose?

Thanks

JP, Belgium
 
R

ruralguy via AccessMonster.com

I'm not really sure what you are looking for. Try putting a MsgBox in the
Current event of your form behind a test for Me.NewRecord and see if that is
what you are looking for.
If Me.NewRecord Then
MsgBox "..."
End If
 
J

Jean-Paul

I wrote:

Private Sub Form_Current()
If Me.NewRecord Then
If MsgBox("bla-bla", vbExclamation + vbOKOnly, "Let op!") = vbOK Then
End If
End If
End Sub

when opening the continuous form, the code isn't triggered.

The idea is to get a messagebox every time the next record is displayed
in the continuous form.
So the code pauzes the record-displaying, shows a messagebox, you click
a button, next record shows up, messagebox again... and so on

Thanks
 
R

ruralguy via AccessMonster.com

Sorry but I doubt that is possible, at least as far as I know.

Jean-Paul said:
I wrote:

Private Sub Form_Current()
If Me.NewRecord Then
If MsgBox("bla-bla", vbExclamation + vbOKOnly, "Let op!") = vbOK Then
End If
End If
End Sub

when opening the continuous form, the code isn't triggered.

The idea is to get a messagebox every time the next record is displayed
in the continuous form.
So the code pauzes the record-displaying, shows a messagebox, you click
a button, next record shows up, messagebox again... and so on

Thanks
I'm not really sure what you are looking for. Try putting a MsgBox in the
Current event of your form behind a test for Me.NewRecord and see if that is
[quoted text clipped - 14 lines]
 
A

Al Campagna

Jean-Paul,
The idea is to get a messagebox every time the next record is displayed in
the continuous form. And
when opening the continuous form, the code isn't triggered.
When the continous form opens, the focus is usually on the first record,
so
there's no event associated with a "new" record. On Current fires, but
you're
not on a new record.

When you place your cursor in... or GoTo... a new record, the OnCurrent
NewRecord will be true.
Perhaps you want to go to a new record when the form opens?
If so, do a...
Private Sub Form_Open(Cancel As Integer)
DoCmd.GoToRecord , , acNewRec
End Sub
That will trigger Rural Guy's OnCurrent message code...

If that's still not a solution, give a few record examples with...
"This is what happens... this is what I want to do."

--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
J

Jean-Paul

I don't think this is exactly what I want
This is what I get now:

A continuous form showing:

Brugerzin
1.1.1 De leerling weet dat iedereen rechten en plichten heeft.
Burgerzin
1.1.2 De leerling illustreert concreet aan de hand van
Burgerzin
1.1.4 De leerling kent de functies en verantwoordelijkhede
Rekenvaardigheden
2.1.1.3 De leerling beheerst de basisrekenvaardigheden
Rekenvaardigheden
2.1.2.5 De leerling beheerst de basisrekenvaardigheden

This is what I want

A continuous form like this:


Brugerzin
1.1.1 De leerling weet dat iedereen rechten en plichten heeft.
1.1.2 De leerling illustreert concreet aan de hand van
1.1.4 De leerling kent de functies en verantwoordelijkhede
Rekenvaardigheden
2.1.1.3 De leerling beheerst de basisrekenvaardigheden
2.1.2.5 De leerling beheerst de basisrekenvaardigheden

So I thought to play with the visible/invisible properties of the
headers like: Brugerzin/Rekenvaardigheden

The hearders are fields in each individual record...

Really hope you can help
I don't need to be able to add or delete records.

Thank you for your kind help

JP
 
A

Al Campagna

Jean-Paul
I think this post belongs in your 12/6/09 "Grouping" question. This
thread is dealing with displaying a messagebox when accessing a New
record.
I had asked for some examples on that question...

As regards your Grouping question... you can not use a form to achive
the grouping your looking for.
--
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
J

Jean-Paul

Correct, but still want to know if it is possible to "do something"
before a new record is displayed in a continuous form...

Thanks
 
A

AccessVandal via AccessMonster.com

The code should work but I don't understand the second IfThen. What do you
want it to do? There's no response with the message.

From what you have posted, you want a nag screen/message for each and every
old record to popup a message and one message if it's a new record. Seems
like you enjoy nagging the users. :)

If that's what you wanted, change it to .....

Private Sub Form_Current()
If Me.NewRecord Then
Msgbox "It's A new Record", vbExclamation + vbOKOnly, "Let op!"
Else
Msgbox "Not A new Record", vbExclamation + vbOKOnly, "Let op!"
End If
End Sub

As posted by others, the Form does not have a Group Header. It is only in
Reports. If you want to do that, use a Report.
 
A

Al Campagna

Jean-Paul,
You still have not clarified what you mean by
"when a new record is 'displayed'"...

Did you read my 12/6/09 1:25PM post?
What is your reply to those questions and suggestions?
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top