.requery wont work.

Joined
Jul 6, 2005
Messages
1
Reaction score
0
we've just updated to office 2003 (from 97) at my work, and one subform in one form has stopped working. the rest work fine.
here's its situation:

its a datasheet subform that shows the detail for orders.
when a button above it is clicked it creates the order record, and it also creates some of the order detail (defaults set on some paramaters in the form).
then the subform (which draws its data from a query which is filtered on the value of a textbox that the button above populates with the ordernumber) is supposed to be requeried with the new data, and then it gets the focus so the user can alter the order if needed.

the creating the data button works. it makes the data as it always has.
the records all get created (i checked in the tables).
the set focus thing works. the subform gets the focus.

but it never gets the data its suposed to be displaying.
i can add more records in it and that works fine, so its not completely lost its connection to the data, but for some reason it doesnt refresh.

there is another button on the main form that has this code:
Code:
Private Sub cmdRefreshDetails_Click()
Me.BookOrder_Details_subform.Requery
Me.BookOrder_Details_subform.SetFocus
End Sub
which i used to use to refresh the subform in order to edit old orders. but this doesnt work anymore either.
i cant figure out how to make the code any less error prone. and it never actualy gives me an error. it jsut doesnt do the .requery
or more specificaly it does it (i steped through the code) but it doesnt work the way its supposed to.
i tried the .refresh thing instead, and that doesnt work either.
i'm not sure of the difference between .refresh and .requery, but since neither works i dont thing their difference matters. i'm not married to either so if someone sugests a way to get one of them to work i'll use that one.

in case this matters:
the form is in a "front end" database and the data is actualy on another computer in a seperate database (also access) that just has the data tables.
so far everything else (including other subforms on the same form) seem to work fine, since the upgrade to 2003.
i've set the macro security setting to "low" because it kept asking me if i trusted my own database not to include "mallicios code" or something.
we've got the enterprise eddition of office 2003 pro. and its complete/full installs. so i dont think i should be missing any components of office.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top