473,324 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Access Job and Customer Relations

I have a db that has a table tblBids and I want to assign multiple contractors to each Bid. I have a Proposal page that will create a proposal for that bid. I need to be able to send a report (the proposal) to all selected contractors for that particular bid. please help
Jun 23 '15 #1
3 1667
zmbd
5,501 Expert Mod 4TB
rmnmech:

You don't mention how you are sending the reports, email - with or without outlook, snail mail, bike messenger, or carrier pigeon };-)

1) Normalization is your friend!
Please read thru the following article in our insights directory: Database Normalization and Table Structures

2) Sending multiple reports will be come easier once you have the database properly normalized and designed. You do not mention if you are sending via email, snailmail, hand delivery, or carrier pigeon ( :D ). If you are using outlook the docmd.sendobject method is the most straight forward for simple emails for sending reports. If you will use the bytes.com search tool using keywords EMAIL and include one of the expert/moderator names (NeoPa, Rabbit, Jforbes, Seth Schrock, ZMBD, etc...) you will turn up many threads covering this topic in great detail.

- if you have a specific question or sticking point we can provide you much better guidance.
Jun 23 '15 #2
Well what it is is sending one report [ProposalID] using a Text box in a form so i figured I would use a query which would grab the ID number from the form and give me a list but the problem is I am trying to get a Sendobject command to send that specific report with the referenced ID to the list of emails that come up.
Jul 1 '15 #3
zmbd
5,501 Expert Mod 4TB
Ok,
Basic concept will be to open the record set for the emails.
Set up for your report
then loop thru the emails attaching the report.

The following is just a framework it will NOT run "as-is" you will have to provide some more detail and hopefully, like habitat for humanity, some time investment to fill in the blanks.
Expand|Select|Wrap|Line Numbers
  1. Dim zDB as DAO.Database
  2. Dim zRS_Emails as DAO.Recordset
  3. Dim zReport as string
  4. Dim zSQL_emails as String
  5. '
  6. '
  7. Set zDB = CurrentDB
  8. zSQL_emails = '<now here you could just use the Query name or build your SQL string
  9. Set zRS_Emails = zDB.Openrecordset(Name:=zSQL_Emails, Type:=dbOpenForwardOnly) 
  10. 'We could open dynamic; however, we're only going to go thru once w/o edits
  11. 'Another caveat... the forward only doesn't let us get an accurate record count... 
  12. 'so if you have a lot of emails... we should go the dynamic route
  13. 'Your users may not like it if there is a large number of emails to send!
  14. '
  15. 'Not sure how to pull the report as you have not
  16. 'provided enough detail about the report itself
  17. zReport = 'the report's name... hopefully you have this running properly
  18. '
  19. 'Note ONLY the pdf format will preserve the report layout!
  20. If zRS_Emails.RecordCount then
  21.    '
  22. ' I would put another conditional here, maybe some
  23. 'additional code to build a list of emails to be sent
  24. 'something, just to allow the user to know what is 
  25. 'going on...
  26.    Do Until zRS_Emails.EOF
  27.     '
  28.     ' I often send different reports for different
  29.     ' people/reasons... and this is one way:
  30.     ' ' zReport = zRS_Emails![reportname]
  31.     '
  32.      DoCmd.SendObject _
  33.        ObjectType:= acSendReport _
  34.        ObjectName:= zReport _
  35.        OutputFormat:= acFormatPDF _
  36.        To:= zRS![EmailAddress] _
  37.        Subject:= zRS![Subject] _
  38.        MessageText:= zRS![message] _
  39.        EditMessage:= False
  40.      zRS.MoveNext
  41. 'I have code here that will show records pending to send.
  42. 'Once you use the MoveNext you can get a record count
  43. 'and update a textbox on a form, system status bar, etc...
  44.    Loop
  45. Else
  46.    msgbox "There are no clients to send reports"
  47. end if
  48. '
  49. 'Error trap
  50.  
  51. 'If you open it, close it
  52. zRS.close
  53. '
  54. 'of you set it, clear it
  55. if not is nothing zRS_Emails then Set zRS_Emails:= Nothing
  56. if not is nothing zDB then set zDB:= Nothing
Jul 1 '15 #4

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

Similar topics

0
by: dp85024 | last post by:
I'm looking for someone to either redesign the Northwind Access customer database supplied by Microsoft (I've modified it some myself and have been using a similar system for two years)....
3
by: Bryan Christopher | last post by:
Hello All! I have a rather abstract question for some genius out there to answer. I want to integrate communication tracking, for customer relations, into an existing Access DB. What I was going...
5
by: helraizer1 | last post by:
Hey all, my first post.. I am making an Access database in which the Customer ID has to be the first 3 letters of their last name followed by a random 4 digit number. I have a 'Last Name'...
1
by: srinit | last post by:
hi i am working on sql2005. i am trying to import database from access including relations by using SSIS.any one suggest me or give me the links. Thanks in advance.
2
by: barry | last post by:
Hello, I'm new to Groups so apologies if I'm in the wrong one which I fear could well be the case. I run an event management company in Ireland. We have over 100 events every year. Does...
12
by: Slick123 | last post by:
hi there urgent help required i am trying to do a customer search function on my database as well as add edit and delete functions, all were working previously however for some reason its...
8
by: puT3 | last post by:
im have tables in access,Customer,Products and Order Table... Customer Table: Cust_ICNumber (PK) Cust_Name Cust_Address Cust_PrimaryNumber Cust_SecondaryNumber Cust_Company
5
by: puT3 | last post by:
im have tables in access,Customer,Products and Order Table... Customer Table: Cust_ICNumber (PK) Cust_Name Cust_Address Cust_PrimaryNumber Cust_SecondaryNumber Cust_Company
5
by: Majdi Musafir | last post by:
I have two tasbles. One called suctomer and has custID, and custname. The other table is cusphone. I need only one realtionship between the two tables. I need to search for an id number, and a...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.