PC Review


Reply
Thread Tools Rate Thread

Clearing Text In A Subform

 
 
Dave
Guest
Posts: n/a
 
      26th May 2004
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
 
Reply With Quote
 
 
 
 
sanfu at techie dot com
Guest
Posts: n/a
 
      1st Jun 2004
Dave wrote:

>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
--------------------------------
Veni, Vidi, Velcro
(I came; I saw; I stuck around.)
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Clearing information from Subform tmdrake Microsoft Access Form Coding 2 9th Jul 2008 11:14 PM
Clearing controls on a subform SAC Microsoft Access Form Coding 3 2nd Nov 2007 03:30 PM
Clearing subform datasheet Michael Wong Microsoft Access Form Coding 2 29th Jan 2004 03:54 PM
Clearing a filter on one subform incorrectly clears filter on another subform BAM65Y Microsoft Access Form Coding 2 18th Nov 2003 04:26 AM
Not clearing out a text box. Marat Mamedov Microsoft Access Getting Started 2 10th Oct 2003 05:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:10 PM.