Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

form refresh strategy

Status
Not open for further replies.
Oct 6, 2002
60
0
0
US
Hi Experts,

I have form refresh problem that I cannot get resolved. I have a table that I use as the record source for my form. The table is created using a make table query. I want to be able to refresh the form data and to do this, the make table query has to be ran and I want the command button on used to run the query right on the form. Access does not like this because even though I have the button closing the form and table that is used as the record source before I re-run the make table, it still is ubable to delete the table, I guess because the code is still processing behind the form. I there a way to use recordsetclone to get around this problem? Any tips or alternate suggestions would be greately appreciated.

Thanks,
Ryan
 
The make table query may not work because it is deleting the recordsource for the form. You may want to try using a combination of a delete query to clear the contents of the table and then an append query to add the records that the make table query would have put in the table. This way the source for the form still exists. You may also need to requery the form before it will display the correct results. Use
Code:
DoCmd.Requery "YourFormName"

You could place all three of these items in the code for the button on the form.
 
How are ya boomer1974 . . . . .

[blue]Put the code in a Standard Module[/blue] and call it from the button. [blue]This way the codes running outside the form . . . .[/blue]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top