fetch data from ms-access to ms-word - excel

i am looking to create an invoice in either MS-excel or MS-word. This invoice will contain several fields like invoice no., customer name, product info, quantity, Amount, Date, Address of customer, phone no. etc. The function of the invoice will be, to generate a unique invoice number, every time i open it, and then the vendor will mention the customer's info, product's info and click on submit button or save it. The info mentioned in the invoice will automatically be saved in the MS-Access database whenever submit button is clicked or the document is saved.
Thus, All the records of the customer will be saved in the MS-Access database. whenever i need to search for a particular customer, i should be able to search it from either invoice no. or any unique field for that particular invoice. I hope my query is explained clearly. please let me know the easiest way to do it. I do not have the vast knowledge about this subject, so give me suggestions that are understandable by a Novice.

I think you are starting from the wrong end. Use an Access form to get the data and then run a mailmerge, the easiest way is to output a text file from Access as the data file and use a Word template for the merge.
An autonumber may suit for invoice number as long as all you need is a unique number. If you need documented sequential numbers, you will have to create then yourself. How you do it will depend on the number of users working at the same time.

I can tell you now, generating Word files with Access is a bit of a pain in the ass. If you really want to do formatting it gets hard (is my experience).
I ended up generating HTML files in which I could control everything, and opening them as .docs. But if you are really new to this, I suggest you start with some VBA tutorials, where they explain to you how you get records from you database and loop through them to generate output. And then you can start looking at file writing functions in VBA.
Can't find any tutorials real quick (my girlfriend is getting angry as we speak), but here is a sample:
http://www.access-programmers.co.uk/forums/showthread.php?t=25354
Just look around in fora, look for file generation and looping through records.

Hi just reading your post, like Remou l would strongly suggest you use Access to enter and store the data. It is possible to get a user to enter data into a spreadsheet and write the data back to Access DB. Not something l would recommend for the novice, here is a link to some code on how it could be done
Returning to your first question, of creating the invoice have you considered generating the invoices from Access using a report? They can be printed to PDF, or exported to various electronic formats. Or is there specific reason to use Word/Excel? If are going down the route of using Word to generate the invoice then use a template as Remou suggested. See this link for some samples see the section titled Access > Word. I have used the examples as a basis for Access to Word. A number of the examples though use a tecnology called DAO, which l understand will not be included in any operating system after Windows 7. Just something to be aware of.
Searching for a record in a database table this link has one possible solution . Also the author has included a example database.

Related

How to create a search function within Excel

Could somebody please help me create a search feature in Excel, intended as a contact lookup? I'm reasonably comfortable in Excel up to 2016 but have no VBA knowledge so I hope this can be done without it. Using Excel 365 and it will be published to Sharepoint to specific users. I know it's poor practice on here to rely on sample data so I'll do my best to explain with a couple of screenshots.
Situation:
I have a raw data sheet containing 50,000 rows (CustomerName, ID, City, Country, EmailAddress etc). Our sales team need to look up contact details but only if they know the customer's name, or part thereof.
I need to hide the underlying data but a rudimentary system is acceptable, we just don't want to serve it up on a platter. The basic shove-it-under-the-mattress method by making it all white text; lock all cells; hide all rows and columns; password protect and hide the sheet is fine for now - no one will be determined enough to start picking that apart.
I've searched here and while there are similar results, nothing really fits perfectly. The most suitable so far was on extendoffice which doesn't quite suffice (will put link in attachment). It utilises SEARCH, RANK, ROW and VLOOKUP functions, the interaction of which I don't entirely understand, but it works.
Interim steps for the lookup function on sheet "Search"
Issues with current concept:
There's no discernable order to the results. The RANK and ROW functions seem to randomly assign ranks, and when you get 50+ results with no way of sorting it will be frustrating.
Whenever one person queries it undoes the last person's search. Expected, but not nice
Partial string search with results unsorted
Additionally:
This doc will be on Sharepoint, directly accessible by ~20 people. Ideally, when one person searches it won't change on someone else's screen
Results should appear alphabetically by customer name
Nice to haves:
Add another criteria to search by. Eg City or Account Manager - doesn't have to stack
Select and copy the contents of a cell (eg email address), but not allow editing of the value or formula. If not possible I'll leave the cells completely locked as the trade-off of accidentally overriding a formula is not worth it.
Any help would be super appreciated

Events does not appear when making an Outlook query from Excel

I'm making an Excel sheet that helps me fill in my oursheet. To accomplish this I create a Power Query that takes data from my Outlook Calendar. However, I have noticed that recurring events only appears once. Also, there is nothing in the query that helps me figure out which events are recurring?
Can anybody help me get the recurring events into Excel through the query?
This is a bit of a conceptual shot in the dark from me, but if you're connecting to Exchange Online (from New Query -> Online Services -> Exchange Online) then you should see a column named Attributes, with records in it. If you look within those records, you should see each record has a field named AppointmentType--that might help you. There is also an IsRecurring field--which might be even more helpful. Further, there is a field called Recurrence, with a record in it that provides info about the recurrences, if any. Lastly, a FirstOccurence field and a LastOccurence field are also included, and might help you in some way as well.
I would think to first identify the recurring records (maybe based off the IsRecurring field, then get their attribute info related to each recurrence (most of which seems to be in the Recurrence field for each record) to construct the single entry items for the recurrences.

Problem with Power App (Loading data from power App to Excel)

I am having a little difficulty uploading information into an Excel from PowerApps.
I created an app with 3 different data sources, 2 of them are SharePoint Lists where the information is uploading without any trouble. The 3rd one, an Excel table, is… not.
I am using the Excel in order to obtain a random name from "Colum1", the logic I found for it is:
Set(varRandom, Last( FirstN ( Filter(TableName, IsBlank(Column2)),1+RoundDown(Rand()*CountRows(TableName),0))).'Column1')
This works, giving a random name although I haven't figured how to take the user itself out of the equation. (Meaning, if I am using the app, I don't want to get my own name randomly selected)
From how it works, I want that when you touch a different button it submits the information that that random name has already been selected by someone, therefore, it can't be picked again. I tried "SubmitForm(FormName)" at first, but I believe I am missing information to tell Excel what to take from the data I am feeding it with and where to send it.
This means just uploading any data into Column3, which starts all blank so everyone can be randomly picked.
I am not a coder, so there's 89% chances I am just writing the functions wrong, but everything else on the app works fine: random selection, navigation between several screens, and the information being submitted to the 2 SharePoint lists.
In short: I need to
Remove the user using the app from the random selection
Uploading any data into the third column so that one name can't be picked twice.
Can anyone assist?
To remove your name from being selected, first you need to let the app know what the name of the user is. You can ask the name of the user and store it in a variable.
Then, if I understand correctly, you write something down on the Column3 when a name is picked to let you know the name was already used and can't be used again. After you know the name of the user, you can write something down right away on the 'Column3' in the row corresponding to the user's name so it can't be picked anymore.
To help you with the Excel we'll need to know where you save your excel file.
Best regards

Using Microsoft Access Database to put values in an Excel Template

I am trying to build a better structure for creating product specifications for our products, Currently everything is done in excel, as a result every time a value is changed, it takes numerous man hours to make that change to all the specifications. Additionally, our inventory of products continues to grow. I am trying to introduce a new system for developing specifications that will allow me to manage the snowball effect of growing specs and increasing work for simple changes to the entire product line.
My question is, if I build a database with all the necessary values for the template we already use (an excel sheet), is there a way I can enter a part number in the excel template and have all the other values populate into the template at their appropriate locations?
I have posted images of the template and a sample of what the Access database could look like.
Thank you for your help.

Send notification/email 7 days before given date

I have table with employees. It contains some information and also date of birth. Is it possible to send notification/email (directly from excel) let's say 7 days in advance to know that he/she will have birthday soon?
I found some tutorials, but all require Visual Basic. Unfortunately, it is for my sister without any knowledge of programming.
Yes, it is possible to do this via Word's mail merge feature. But since this would require quite a few manual steps (presumably on a daily/weekly basis), I'm afraid it's not what your sister is after. You could code a similar feature in VBA but that would still require her to open the document regularly to run the macro so perhaps it would be quicker and simpler to just check a filtered employee list.
If you want a closer look at mail merge, try this. You could use a helper column to identify which birthdays are close (e.g. using this) and filter on that column, then you show only those whose birthdays are in the next x days.

Resources