Bill
(see in-line comments)
Hulk said:
Jeff,
Running the query from the form does not work, it asks for the id number
to display, when it doesn't ask it send just a blank form instead of a form
with data in the fields.
Whoa! Sometimes the query prompts for ID and sometimes it doesn't? Since
the query is being changed each time, this implies that sometimes the ID
is
available and sometime it isn't. What more can you figure out about when
it
works and when it doesn't.
What about my earlier posted suggestion that you open your form and select
your record, then, without closing the form, you go to the query and run
it?
What happens when you do that?
I have " [Forms]![Memos Add]![ID]" in the criteria
section of the ID.
I assume you mean "in the criteria section of the query"?
When I enter anything into the first field on click it
is to save the record and thus assigning a ID number.
"it is to save the record" -- how? what's your code? Have you confirmed
that a record is actually saved before proceeding? Have you confirmed
that
an "ID" is actually assigned?
When I click on the
Send E-Mail Button I want it to send E-mail of only the record which you
have been working on and has been saved when leaving the first field.
You mentioned this in earlier posts, right? This is repeat, not new,
information, correct?
The
record is saved to the table when you exit the first field ok, the macro on
the form calls up the report whos name ic "Current Memo" who has the data
source of the Current Query with the above information.
What happens if you change to design mode for the report, open the
Properties window, follow the source to the query, and run the query?
Right now it is sending a blank when it doesn't ask for an ID
number,
when it does ask, if you type a valid number in it is sending just that
report, which would be right.
The implication of this is that your query is not seeing the control you
believe holds the "ID". This could be because the form is closed, or
because there is a typo somewhere in how the control is being referred to.
The fact that sometimes it works (even if it sends no record) and
sometimes
not still implies that the form is open sometimes, and sometimes not.
I don't want to have the user type anything
in, I want to have the command button do the sending that is why I say I may
be going about this all wrong or in a round about way.
This is a reasonable desire and the way that Access does, in fact, work.
That your combination isn't working yet suggests that it needs a bit more
troubleshooting. Don't give up!
Does that Help??
The whole file right now is only 1M, I could send it to anyone willing to
help.
You may find few takers. Would you accept and open a file from someone
you
don't know?
--
Good luck
Jeff Boyce
<Access MVP>