Form filter

  • Thread starter Thread starter Jeroen Verdrengh
  • Start date Start date
J

Jeroen Verdrengh

Hi,

I have a mainform with 2 buttons and a modal form that is supposed to show 1
record of a table and only that record. I use the openform action in a
macro to open the modalform after the user has clicked on a button on the
mainform. There are 2 possibilities, depending on whichbutton on the main
form is clicked:

1) Data mode = edit, the key of the record is set in the where-condition of
the openform-action
2)data mode = add

This all works perfectly untill I scroll my mousewheele; then in both cases
the modal form switches to a new record (empty record ~ "add new data").
How can I prevent this from happening? I've tried to set the form's cycle
property to different values but it doesn't seem to do the job.

Any help appreciated.

greets,

Jeroen
 
Is the ONE record already existing and you are just calling it up? If so,
disable the ADD Records property of the form. Then you can enable when you open
the form with datamode add. Then try to disable it in the before insert event
(not quite sure this will work)

Otherwise, you will need to check out www.lebans.com for code to disable the
mouse scroll.
 
Back
Top