By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,041 Members | 1,858 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,041 IT Pros & Developers. It's quick & easy.

Creating a report fo one record only

P: 1
I have created a database which hold details of appointments. I have created a query to show all appointments due within the month from todays date. I have then made this query into a form showing each appointment due as a separate line. What I want to do is add a button at the end of each line that when pressed creates a letter using specifically the data from that one record. At the moment I am using the code Do.Cmd.OPenReport "rptname", acPreview, , [ID] = &forms![form name]![ID]" but this just brings up all the records in the query, not just the one I am on.

Can anyone help?
May 10 '07 #1
Share this Question
Share on Google+
1 Reply


JConsulting
Expert 100+
P: 603
I have created a database which hold details of appointments. I have created a query to show all appointments due within the month from todays date. I have then made this query into a form showing each appointment due as a separate line. What I want to do is add a button at the end of each line that when pressed creates a letter using specifically the data from that one record. At the moment I am using the code Do.Cmd.OPenReport "rptname", acPreview, , [ID] = &forms![form name]![ID]" but this just brings up all the records in the query, not just the one I am on.

Can anyone help?
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenReport "rptname", acPreview, , "[ID] =" & Me.[ID]
  2.  
May 11 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.