473,406 Members | 2,281 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,406 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 1669
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.