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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show table being processed 1

Status
Not open for further replies.

richardii

Programmer
Jan 8, 2001
104
GB
Please could anyone tell me how I can show the table that's currently being processed in the loop below. I'm trying to use a pop up form to show the name of the table being linked - only the pop up only gets the focus after the loop's done.
Thanks.

Private Sub Command0_Click()
'now do the imports
Dim db As DAO.Database
Dim rsTable As DAO.Recordset

Set db = CurrentDb
Set rsTable = db.OpenRecordset("tbl")
rsTable.MoveFirst
Do While Not rsTable.EOF
DoCmd.TransferDatabase acLink, "ODBC", "ODBC;DSN=geneva_for_cw;UID=geneva_admin;PWD=geneva_admin;SERVER=GENEVA-EAG;", acTable, "geneva_admin." & rsTable![TABLE_NAME], "geneva_admin." & rsTable![TABLE_NAME], False
DoCmd.OpenForm ("pop")
Forms![pop].SetFocus
Forms![pop]![Message] = "geneva_admin." & rsTable![TABLE_NAME]
rsTable.MoveNext
Loop
End Sub
 
Hallo,

You can try to put a DoEvents statement into the loop, that *should* force the code to do any outstanding things (such as drawing windows, etc.) You might also want to repaint or refresh the pop form after writing to it.

Try various combinations, you'll certainly improve it, but it may not be totally perfect...

- Frink
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top