Clearing Text In A Subform

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I have converted my access 97 database to access 2002 and
the code I used to clear the fields in the subform no
longer work due to old DAO syntax. I have tried many
things to get the code to work. I have gotten the subform
to open but I can't clear out the records. Here is the
code that was used in Access 97....

DoCmd.OpenForm "OT:CLASS 410"

Forms![OT:CLASS 410].Requery
Forms![OT:CLASS 410].Dynaset.MoveFirst
Forms![OT:CLASS 410].Dynaset.Monday = " "
Forms![OT:CLASS 410].Dynaset.MondayR = " "
...
...
...
Forms![OT:CLASS 410].Dynaset.UPDATE

Is there a different way to code it kinda like this so it
works. Also is there a way to get it so when I
type "me. " the list of text fields will appear so i can
clear them. Any help or suggestions would be great.

Thanks, David
 
Dave said:
I have converted my access 97 database to access 2002 and
the code I used to clear the fields in the subform no
longer work due to old DAO syntax. I have tried many
things to get the code to work. I have gotten the subform
to open but I can't clear out the records. Here is the
code that was used in Access 97....

DoCmd.OpenForm "OT:CLASS 410"

Forms![OT:CLASS 410].Requery
Forms![OT:CLASS 410].Dynaset.MoveFirst
Forms![OT:CLASS 410].Dynaset.Monday = " "
Forms![OT:CLASS 410].Dynaset.MondayR = " "
..
..
..
Forms![OT:CLASS 410].Dynaset.UPDATE

Is there a different way to code it kinda like this so it
works. Also is there a way to get it so when I
type "me. " the list of text fields will appear so i can
clear them. Any help or suggestions would be great.

Thanks, David
David,

When converting from A97 to A2K, you need to set a reference to the
Microsoft DAO 3.6 object library.

Close the window, then open to references and move the DAO *above* the
reference to the ADO libary.

Your code should run.......

Steve
 
Back
Top