clear subform on new record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I got my subform (subTool) to open to a new record when the form (Form2) is
first opened. But what I'm running into right now is that when I am on a
previous record and click the New Record button in the navigation bar, the
old info stays in the subform. How can I go about getting the subform to
clear also when the user navigates to a new record?

Thanks!
Seren
 
The only problem with that method (I tried it, it worked, but created a
different problem that took me FOREVER to figure out how to fix the first
time... )...

When the user is entering a new JobNum (on main form), they need to be able
to search by ToolNum in subform. If the record for that toolnum exists, it
needs to populate the subform. Switching the Data Entry to Yes does not
allow that to happen. you *must* put in new, unique toolnum every time (as I
see it)...
--
Always behave like a duck- keep calm and unruffled on the surface but paddle
like the devil underneath.


Al Camp said:
Seren,
Set the subform's DataEntry to Yes. The user can only enter new records.
 
It sounds like you need to requery the subform. I am betting the
subform has a criteria that still has the old value. That needs to be
changed when you hit the "New" button and the subform requeried.
 
Ron-

Awesome! Thanks a bunch. I think I was on the right track with this one.
I know I tried the requery thing before, but maybe in the wrong place. With
your suggestion, I started playing around with it (mainly the "where" aspect)
and finally got the results desire!

Thanks!!
Seren
 
I spoke too soon. Yesterday it looked like it was working, then I discovered
some of the Tools were then blank when I went back to previous records. I
closed the database, for whatever reason, reopened it later, and it's no
longer working at all. Back to behaving the way it did. This is what I
added to the main form:

Private Sub Form_Current()
Me.subTool.Requery
End Sub
 
Well, I ended up getting around this by creating a "New Record" button and
will just disable the navigation button. The user can look up job numbers by
typing it in and they will be sent to that job.

But now I have a different problem regarding the subform. I have several
tool numbers in the tool table. as I scroll through the existing job number
records, the only tool info that shows up is one that contains a specific
tool number. all of the rest of the jobs connected to different tool numbers
show up blank. Any ideas on this one?
 
Sounds like a filter has been left on (and/or the filter criteria is
not being updated) Sometimes filters are very specific, so the filter
may have to be reset as you scrol through the records.)

Or

The query has a criteria, and whatever the criteria is not being
updated as you scroll through records.
 

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

Back
Top