A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Query Only Creent Record?



 
 
Thread Tools Display Modes
  #1  
Old January 17th, 2005, 04:18 PM
Hulk
external usenet poster
 
Posts: n/a
Default Query Only Creent Record?

Is there a way to put build a query to accept only the current record from
another form? I want to use the autonumber to show only the record showing
on the screen and need to build a query to pass that information into
another form.

Thanks
Bill


  #2  
Old January 17th, 2005, 05:02 PM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default

Bill

Why?

You've described "how". Perhaps the 'group readers can offer you an
alternate approach if you explain what problem you are trying to solve by
passing information to a second form...

--
Good luck

Jeff Boyce
Access MVP

"Hulk" wrote in message
...
Is there a way to put build a query to accept only the current record from
another form? I want to use the autonumber to show only the record

showing
on the screen and need to build a query to pass that information into
another form.

Thanks
Bill



  #3  
Old January 18th, 2005, 06:47 AM
Chris
external usenet poster
 
Posts: n/a
Default

I'd also like to know how to do this. I personally am creating a small
change management database. Once a change has been initiated I would like
for the developer to be able to go in review the request and then click on a
button to pull up the developer notes section which lives in a different
table.



"Jeff Boyce" wrote:

Bill

Why?

You've described "how". Perhaps the 'group readers can offer you an
alternate approach if you explain what problem you are trying to solve by
passing information to a second form...

--
Good luck

Jeff Boyce
Access MVP

"Hulk" wrote in message
...
Is there a way to put build a query to accept only the current record from
another form? I want to use the autonumber to show only the record

showing
on the screen and need to build a query to pass that information into
another form.

Thanks
Bill




  #4  
Old January 18th, 2005, 02:29 PM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default

Chris

Another approach to handling this would be to use a sub-form. The Request
information lives on a main form, and the related "developer notes" live on
a sub-form, tied to the main form by the ID field of the Request.

--
Good luck

Jeff Boyce
Access MVP

"Chris" wrote in message
...
I'd also like to know how to do this. I personally am creating a small
change management database. Once a change has been initiated I would like
for the developer to be able to go in review the request and then click on

a
button to pull up the developer notes section which lives in a different
table.



"Jeff Boyce" wrote:

Bill

Why?

You've described "how". Perhaps the 'group readers can offer you an
alternate approach if you explain what problem you are trying to solve

by
passing information to a second form...

--
Good luck

Jeff Boyce
Access MVP

"Hulk" wrote in message
...
Is there a way to put build a query to accept only the current record

from
another form? I want to use the autonumber to show only the record

showing
on the screen and need to build a query to pass that information into
another form.

Thanks
Bill





  #5  
Old January 20th, 2005, 12:31 AM
Hulk
external usenet poster
 
Posts: n/a
Default

Jeff,
I have a table called Memos that the user enters information into only
on an add form, when they have added the information I want a query command
button so that they can e-mail only the information in the current form, no
others. I build a command button for e-mailing with sendobject but it send
the whole tabel in forms. I only want to sent the current record.
They suggested way to build a command button but it had many lines of
code and it didn't work. I have tried and tried but building a query to
show only the current record which had just been added seems like a way
around the problem. It hasn't happen. The table has an autonumber which it
uses as the ID, the query uses the information from the main table of
"memos" and with the ID as a reference I want to show that information in a
form called "current form" which will have a command button on it to e-mail
just the current form. I can't make it to simple, and code just doesn't
seem to work, I'm just a novice.

Thanks
Bill
"Jeff Boyce" -DISCARD_HYPHEN_TO_END wrote in message
...
Bill

Why?

You've described "how". Perhaps the 'group readers can offer you an
alternate approach if you explain what problem you are trying to solve by
passing information to a second form...

--
Good luck

Jeff Boyce
Access MVP

"Hulk" wrote in message
...
Is there a way to put build a query to accept only the current record
from
another form? I want to use the autonumber to show only the record

showing
on the screen and need to build a query to pass that information into
another form.

Thanks
Bill





  #6  
Old January 20th, 2005, 12:55 PM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default

Bill

I'm a bit unclear still...

Your description said, roughly, "it didn't work". That isn't much to go on
in helping you troubleshoot.

You have a table that has multiple rows. You want a way to send what you
are calling the "current record", apparently based on what is being
displayed in a form.

I would approach this by building a query that refers to that form's record
ID and returns the field(s) I wanted. Then I'd build a command button that
attached the output of that query to the outgoing email.

For the query, I'd open up the form and select a record, then use the
database window to create a new query. I'd select the RecordID field and
?some other field. Under the RecordID field, in the criterion, I'd add
something like:
Forms!YourFormName!YourRecordIDField
(your syntax may vary). Then I'd run it, to see if the query works.

For the command button, it sounds like you've already set up one that works,
just takes the whole table. What happens if you build the query above and
then send the query?

You don't mention where the command button is located, but your earlier post
mentioned two forms. I hope the command button is on the form from which
you wish to send the record.

--
Good luck

Jeff Boyce
Access MVP

"Hulk" wrote in message
...
Jeff,
I have a table called Memos that the user enters information into only
on an add form, when they have added the information I want a query

command
button so that they can e-mail only the information in the current form,

no
others. I build a command button for e-mailing with sendobject but it

send
the whole tabel in forms. I only want to sent the current record.
They suggested way to build a command button but it had many lines of
code and it didn't work. I have tried and tried but building a query to
show only the current record which had just been added seems like a way
around the problem. It hasn't happen. The table has an autonumber which

it
uses as the ID, the query uses the information from the main table of
"memos" and with the ID as a reference I want to show that information in

a
form called "current form" which will have a command button on it to

e-mail
just the current form. I can't make it to simple, and code just doesn't
seem to work, I'm just a novice.

Thanks
Bill
"Jeff Boyce" -DISCARD_HYPHEN_TO_END wrote in message
...
Bill

Why?

You've described "how". Perhaps the 'group readers can offer you an
alternate approach if you explain what problem you are trying to solve

by
passing information to a second form...

--
Good luck

Jeff Boyce
Access MVP

"Hulk" wrote in message
...
Is there a way to put build a query to accept only the current record
from
another form? I want to use the autonumber to show only the record

showing
on the screen and need to build a query to pass that information into
another form.

Thanks
Bill






  #7  
Old January 21st, 2005, 02:38 PM
Hulk
external usenet poster
 
Posts: n/a
Default

Jeff,
Tried that in the criteria field but it comes up asking for the ID
number to send to E-Mail.
I may be making more of this then needed, I have five forms: Memos Add,
Memos Active, Orders Active, Memos Completed and Orders Completed. These
are all controlled from a main switchboard, the forms are all the same
except some fields are locked on each and some are not so that data entry by
the user is limited.
On each form there is a commandd button to exit back to the main
switchboard or to print the current viewed form to a printer. This command
button sends the report called Memos to a printer with just the current
record showing. These buttons work great. The problem is that when I try
to put a button on any form to E-Mail just the current form using a Macro
called Send E-Mail, it sends all the records in the table, ie 26 pages of
reports, to e-mail. I only want to sent the current record that was either
just added or that are currently still open and not completed.
I tried to build a form called Current Form and a report called Current
Mermo with a query that only calls up the current record that is showing and
then have the command button on the Current Form to E-mail just that form
with the Send E-mail Macro, but it doesn't update until the Memo Add form is
closed and so it sends a blank report. I really don't need all the extra
forms, reports and macros but I can't get the Send E-mail to send only the
current form.
I tried using the formula you gave me, but it asks for a ID to send and
even then it won't send the current form if you haven't closed the Memos Add
form.

Hope this explains the problem some, any help or questions??

Thank
Bill
"Jeff Boyce" -DISCARD_HYPHEN_TO_END wrote in message
...
Bill

I'm a bit unclear still...

Your description said, roughly, "it didn't work". That isn't much to go
on
in helping you troubleshoot.

You have a table that has multiple rows. You want a way to send what you
are calling the "current record", apparently based on what is being
displayed in a form.

I would approach this by building a query that refers to that form's
record
ID and returns the field(s) I wanted. Then I'd build a command button
that
attached the output of that query to the outgoing email.

For the query, I'd open up the form and select a record, then use the
database window to create a new query. I'd select the RecordID field and
?some other field. Under the RecordID field, in the criterion, I'd add
something like:
Forms!YourFormName!YourRecordIDField
(your syntax may vary). Then I'd run it, to see if the query works.

For the command button, it sounds like you've already set up one that
works,
just takes the whole table. What happens if you build the query above and
then send the query?

You don't mention where the command button is located, but your earlier
post
mentioned two forms. I hope the command button is on the form from which
you wish to send the record.

--
Good luck

Jeff Boyce
Access MVP

"Hulk" wrote in message
...
Jeff,
I have a table called Memos that the user enters information into
only
on an add form, when they have added the information I want a query

command
button so that they can e-mail only the information in the current form,

no
others. I build a command button for e-mailing with sendobject but it

send
the whole tabel in forms. I only want to sent the current record.
They suggested way to build a command button but it had many lines
of
code and it didn't work. I have tried and tried but building a query to
show only the current record which had just been added seems like a way
around the problem. It hasn't happen. The table has an autonumber which

it
uses as the ID, the query uses the information from the main table of
"memos" and with the ID as a reference I want to show that information in

a
form called "current form" which will have a command button on it to

e-mail
just the current form. I can't make it to simple, and code just doesn't
seem to work, I'm just a novice.

Thanks
Bill
"Jeff Boyce" -DISCARD_HYPHEN_TO_END wrote in
message
...
Bill

Why?

You've described "how". Perhaps the 'group readers can offer you an
alternate approach if you explain what problem you are trying to solve

by
passing information to a second form...

--
Good luck

Jeff Boyce
Access MVP

"Hulk" wrote in message
...
Is there a way to put build a query to accept only the current record
from
another form? I want to use the autonumber to show only the record
showing
on the screen and need to build a query to pass that information into
another form.

Thanks
Bill








  #8  
Old January 21st, 2005, 03:10 PM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default

If you build the query that refers to the form's RecordID value, does it
work? If THAT is what you are saying "asks for an ID", it could be because
the form wasn't opened and a record selected.

Build the query. Open the form. Select a record on the form. Use F11 to
go back to the database window. Find the query and try running it. What
happens?

One thing at a time...

Jeff Boyce
Access MVP

"Hulk" wrote in message
...
Jeff,
Tried that in the criteria field but it comes up asking for the ID
number to send to E-Mail.
I may be making more of this then needed, I have five forms: Memos

Add,
Memos Active, Orders Active, Memos Completed and Orders Completed. These
are all controlled from a main switchboard, the forms are all the same
except some fields are locked on each and some are not so that data entry

by
the user is limited.
On each form there is a commandd button to exit back to the main
switchboard or to print the current viewed form to a printer. This

command
button sends the report called Memos to a printer with just the current
record showing. These buttons work great. The problem is that when I try
to put a button on any form to E-Mail just the current form using a Macro
called Send E-Mail, it sends all the records in the table, ie 26 pages of
reports, to e-mail. I only want to sent the current record that was

either
just added or that are currently still open and not completed.
I tried to build a form called Current Form and a report called

Current
Mermo with a query that only calls up the current record that is showing

and
then have the command button on the Current Form to E-mail just that form
with the Send E-mail Macro, but it doesn't update until the Memo Add form

is
closed and so it sends a blank report. I really don't need all the extra
forms, reports and macros but I can't get the Send E-mail to send only the
current form.
I tried using the formula you gave me, but it asks for a ID to send

and
even then it won't send the current form if you haven't closed the Memos

Add
form.

Hope this explains the problem some, any help or questions??

Thank
Bill
"Jeff Boyce" -DISCARD_HYPHEN_TO_END wrote in message
...
Bill

I'm a bit unclear still...

Your description said, roughly, "it didn't work". That isn't much to go
on
in helping you troubleshoot.

You have a table that has multiple rows. You want a way to send what

you
are calling the "current record", apparently based on what is being
displayed in a form.

I would approach this by building a query that refers to that form's
record
ID and returns the field(s) I wanted. Then I'd build a command button
that
attached the output of that query to the outgoing email.

For the query, I'd open up the form and select a record, then use the
database window to create a new query. I'd select the RecordID field

and
?some other field. Under the RecordID field, in the criterion, I'd add
something like:
Forms!YourFormName!YourRecordIDField
(your syntax may vary). Then I'd run it, to see if the query works.

For the command button, it sounds like you've already set up one that
works,
just takes the whole table. What happens if you build the query above

and
then send the query?

You don't mention where the command button is located, but your earlier
post
mentioned two forms. I hope the command button is on the form from

which
you wish to send the record.

--
Good luck

Jeff Boyce
Access MVP

"Hulk" wrote in message
...
Jeff,
I have a table called Memos that the user enters information into


only
on an add form, when they have added the information I want a query

command
button so that they can e-mail only the information in the current

form,
no
others. I build a command button for e-mailing with sendobject but it

send
the whole tabel in forms. I only want to sent the current record.
They suggested way to build a command button but it had many lines
of
code and it didn't work. I have tried and tried but building a query

to
show only the current record which had just been added seems like a way
around the problem. It hasn't happen. The table has an autonumber

which
it
uses as the ID, the query uses the information from the main table of
"memos" and with the ID as a reference I want to show that information

in
a
form called "current form" which will have a command button on it to

e-mail
just the current form. I can't make it to simple, and code just

doesn't
seem to work, I'm just a novice.

Thanks
Bill
"Jeff Boyce" -DISCARD_HYPHEN_TO_END wrote in
message
...
Bill

Why?

You've described "how". Perhaps the 'group readers can offer you an
alternate approach if you explain what problem you are trying to

solve
by
passing information to a second form...

--
Good luck

Jeff Boyce
Access MVP

"Hulk" wrote in message
...
Is there a way to put build a query to accept only the current

record
from
another form? I want to use the autonumber to show only the record
showing
on the screen and need to build a query to pass that information

into
another form.

Thanks
Bill









  #9  
Old January 22nd, 2005, 12:14 AM
Hulk
external usenet poster
 
Posts: n/a
Default

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. I have " [Forms]![Memos Add]![ID]" in the criteria
section of the ID. When I enter anything into the first field on click it
is to save the record and thus assigning a ID number. 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. 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.
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. 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.
Does that Help??
The whole file right now is only 1M, I could send it to anyone willing to
help.

Thanks
Bill Frederick

"Jeff Boyce" -DISCARD_HYPHEN_TO_END wrote in message
...
If you build the query that refers to the form's RecordID value, does it
work? If THAT is what you are saying "asks for an ID", it could be
because
the form wasn't opened and a record selected.

Build the query. Open the form. Select a record on the form. Use F11 to
go back to the database window. Find the query and try running it. What
happens?

One thing at a time...

Jeff Boyce
Access MVP

"Hulk" wrote in message
...
Jeff,
Tried that in the criteria field but it comes up asking for the ID
number to send to E-Mail.
I may be making more of this then needed, I have five forms: Memos

Add,
Memos Active, Orders Active, Memos Completed and Orders Completed. These
are all controlled from a main switchboard, the forms are all the same
except some fields are locked on each and some are not so that data entry

by
the user is limited.
On each form there is a commandd button to exit back to the main
switchboard or to print the current viewed form to a printer. This

command
button sends the report called Memos to a printer with just the current
record showing. These buttons work great. The problem is that when I
try
to put a button on any form to E-Mail just the current form using a Macro
called Send E-Mail, it sends all the records in the table, ie 26 pages of
reports, to e-mail. I only want to sent the current record that was

either
just added or that are currently still open and not completed.
I tried to build a form called Current Form and a report called

Current
Mermo with a query that only calls up the current record that is showing

and
then have the command button on the Current Form to E-mail just that form
with the Send E-mail Macro, but it doesn't update until the Memo Add form

is
closed and so it sends a blank report. I really don't need all the extra
forms, reports and macros but I can't get the Send E-mail to send only
the
current form.
I tried using the formula you gave me, but it asks for a ID to send

and
even then it won't send the current form if you haven't closed the Memos

Add
form.

Hope this explains the problem some, any help or questions??

Thank
Bill
"Jeff Boyce" -DISCARD_HYPHEN_TO_END wrote in
message
...
Bill

I'm a bit unclear still...

Your description said, roughly, "it didn't work". That isn't much to
go
on
in helping you troubleshoot.

You have a table that has multiple rows. You want a way to send what

you
are calling the "current record", apparently based on what is being
displayed in a form.

I would approach this by building a query that refers to that form's
record
ID and returns the field(s) I wanted. Then I'd build a command button
that
attached the output of that query to the outgoing email.

For the query, I'd open up the form and select a record, then use the
database window to create a new query. I'd select the RecordID field

and
?some other field. Under the RecordID field, in the criterion, I'd add
something like:
Forms!YourFormName!YourRecordIDField
(your syntax may vary). Then I'd run it, to see if the query works.

For the command button, it sounds like you've already set up one that
works,
just takes the whole table. What happens if you build the query above

and
then send the query?

You don't mention where the command button is located, but your earlier
post
mentioned two forms. I hope the command button is on the form from

which
you wish to send the record.

--
Good luck

Jeff Boyce
Access MVP

"Hulk" wrote in message
...
Jeff,
I have a table called Memos that the user enters information into


only
on an add form, when they have added the information I want a query
command
button so that they can e-mail only the information in the current

form,
no
others. I build a command button for e-mailing with sendobject but it
send
the whole tabel in forms. I only want to sent the current record.
They suggested way to build a command button but it had many
lines
of
code and it didn't work. I have tried and tried but building a query

to
show only the current record which had just been added seems like a
way
around the problem. It hasn't happen. The table has an autonumber

which
it
uses as the ID, the query uses the information from the main table of
"memos" and with the ID as a reference I want to show that information

in
a
form called "current form" which will have a command button on it to
e-mail
just the current form. I can't make it to simple, and code just

doesn't
seem to work, I'm just a novice.

Thanks
Bill
"Jeff Boyce" -DISCARD_HYPHEN_TO_END wrote in
message
...
Bill

Why?

You've described "how". Perhaps the 'group readers can offer you an
alternate approach if you explain what problem you are trying to

solve
by
passing information to a second form...

--
Good luck

Jeff Boyce
Access MVP

"Hulk" wrote in message
...
Is there a way to put build a query to accept only the current

record
from
another form? I want to use the autonumber to show only the record
showing
on the screen and need to build a query to pass that information

into
another form.

Thanks
Bill











  #10  
Old January 22nd, 2005, 02:40 PM
Jeff Boyce
external usenet poster
 
Posts: n/a
Default

Bill

(see in-line comments)

"Hulk" wrote in message
...
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?


Thanks
Bill Frederick


--
Good luck

Jeff Boyce
Access MVP

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Prevent Blank Records being written. Need Help. Robert Nusz @ DPS Using Forms 4 December 29th, 2004 06:15 PM
Automatically displaying a certain record of a query General Discussion 1 December 12th, 2004 11:08 PM
How to get a field on a form to reflect a certain record of a query? General Discussion 0 December 11th, 2004 01:56 AM
Still Hoping for help with a Query problem Don Sealer Using Forms 15 November 13th, 2004 07:24 AM
Hidden files in Ms-Query cause ODBC connect errors or Query is wac needyourhelp General Discussion 4 July 12th, 2004 09:38 PM


All times are GMT +1. The time now is 03:19 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.