Insert query inside of memo Access - ms-access

Is it possible to insert a query or tag inside of an access memo? I would like to create a welcome packet that will include a welcome letter along with other data pulled from Access tables. I can create a new field in a table to store the text i need but i would like to include several other pieces of information pulled from into the report. I would like to insert the data elements as if i was inserting a tag into an html page. The welcome letter should pull in the user's name and the letter address their name and other details individual to the homeowner. The other pages of the report include details about the user that are updated from several locations. Is this even possible in access? If not i will tell users that they must create the welcome letter somewhere else and attach it to the packet manually but it would save a lot of time to be able to print the letter with the packet.

I was able to resolve the problem by storing the paragraph text in new columns and setting the memo fields to "can grow" in the report. I then seperated the paragraphs with the inserted data. I will also look into Remou's options that he provided as the MS Word automation and HTML in code sound like better options.
Thanks Remou

Related

MS Access Error 3188: Could not update; currently locked by another session on this machine

I have a form bound to a table with a long text field (form_conversationDetail).
I can add and then edit and save the same record until the number of characters in the field goes over 2000.
After that, I start getting the following when I attempt to save the record:
Error 3188: Could not update; currently locked by another session on this machine.
I have a parent form (form_conversations) that provides a list of records that allow the user to choose which conversation to edit in form_conversationDetail.
Before opening form_conversationDetail, I tried setting Dirty to False.
I added the following statement right before I save which seems to have resolved the situation:
DBEngine.Idle dbFreeLocks
I have an Access database with a table called "Post" and a field called "body" which was long text RTF. I was constantly getting:
Could not update; currently locked by another session on this machine
To reproduce
Create a table called Post with a long test field of type RFT.
Create two separate forms that access Post.Body
Open one form, and add more than 2000 characters (not sure about the threshold, but only occurs with large data) to Post.Body. Navigate to a different record and then back
Open a second form that displays Post.Body
Navigate both forms to the same record with the long text. Try editing the text and then saving (navigating to another record)
Observed
"Could not update; currently locked by another session on this machine"
Have to restart Access to fix.
Other Scenarios
The same issue happens if there is a form and a report that both have the RFT control and they point to the same record, and you try to edit the text in the form.
If the second form edits the same record, but does not have the RTF control, there is no problem.
If the report points to the same record, but does not have the RTF control, there is no problem.
I tried with the forms both in the same database as the tables as well as with the table linked from another database, and the same problem.
I tried the various lock options under "Options" and had the same problem.
Conclusion
This seems like a Microsoft Access bug. The fact that a report, which can't even edit the data and should be doing a non-locking read causes the issues, suggests it's a bug.
Fix
I have to make sure no one opens a second screen that views the same record with the RTF control while someone is editing the RTF value.
I tried refresh and other possible fixes I found online, but for whatever reason, I still had the problem.

MS Access - searching for better method to create and edit records

I have made a database that I use at work for tracking tags that get signed out. The way I currently have it is I created a table that has 100 records manually entered already. Field Name "TagNumber" 1 to 100. There are several other fields for every record that is currently blank.
A user will have access to a form that they will select a tag number from the "TagNumber" dropdown list. Doing this will allow them to fill in the other fields with the correct info for that tag. When finished they will click a save and exit button that will modify that record they just put the info in for. It will also update a Field named "SignedOut" it is a data type Yes/No field. Once the user has signed out that tag number it will no longer show up on the dropdown list when someone else goes to sign out a tag.
On the same form there is a "SignIn" dropdown list that only shows the tags that are checked yes in the "SignedOut" Field. When a user selects a tag to be signed they enter their name and date and click save and exit. Clicking the save and exit button will run a macro that copies all the data on that single record to another table for tracking purposes. It also sets all the fields back to blank except the "TagNumber" field. This allows another user to sign out that tag again.
examples of my tables:
Nothing signed out yet
Tag 4 signed out
Now my issue I am running into is If I provide this to another section they have different tag numbers and I don't want to have to go to the table and physically change every tag number. Is there a way I can auto populate the list with different tag numbers? or is there a way I should be doing this that is completely different from the way I am doing it?
Thanks for any info you can provide.

How Do I Print a Blank Form in MS Access to be used for data collection in the field?

I am leading a data collection initiative in which teams are sent out to remote areas in the field to collect data. Its not possible to send the collection teams out with any kind of technology, so the data collection must be done using a paper and pencil only.
I have a MS Access database with forms set up for data entry. Besides a screen capture, how can I print a blank form so that the data collectors can simply pencil in the values when they are in the field?
I've tried printing the form, but printing always shows entries from the database — I cannot find a way to print a blank copy of the form.
Many solutions.
Create a form of the table, unbound the fields by deleting each control recordsource.
Create a report of a copy of the table. Fill the copy table with blank spaces.
Create an unbound form, arrange textboxes as necessary.
Lybren offered some good solutions. However, I ended up using Adobe Pro. I printed as PDF, then deleted the text that way.
Alternatively, you could do this all within MS Access itself, just set the text color for all the fields to be the same as the background color when you print.
Make the font in your data fields the same colour as the fields background. Quickest way I found!

Searching through a CSV file to know the next macro action

So, I have my current bot (Yes, this bot is entirely legal. It's just a web scraper-esque bot) extracting data from a web page in a loop. But, at the beginning of the loop, I want it to be able to look through the previously-extracted data and compare it to the data on the page to choose what I want to do next. Is this possible?
For example:
Data is saved like this: name1,100,name2,200 Where names can be any string of letters, and the numbers can be any string of numbers.
To give you an idea on what the page looks like: It has two names, each with values under them, and buttons. The names and values change every minute or so.
First, we check the current names on the page. (There are two names on the page)
Next, we compare them to our database to see if they reside in it.
If they both do, we check the numbers after the name
If the first names number is higher than the seconds, we click the first names button
If the second names number is higher than the firsts, we click the second names button
Now we wait twenty seconds
Now, new values have appeared for both names. We find the mean of the new values presented to us and the old values, by adding them together and dividing by two.
What I really need help on is how to search through the CSV file for the names and then numbers after the names, and then how to save data to the same spot as the old data was from.
I know that this is easily possible in most programming languages (Java, C++, etc etc) but I wasn't sure if it would be possible in iMacros.
you can't save data in same csv as you use for search in imacros.
in regular imacros you do not have loop inside loop and IF statements as well, so you need to switch to javascript or similar.
extracting data from csv is simple: http://wiki.imacros.net/!COLn

Access 2007 Report: Code or no Code?

I've been researching around a lot and I just can't find something I think should be very easy to someone with very little experience with Access 2007.
I am trying to create a report. The db has two tables. One with account, name and address. The other has account and product Id. The tables are joined on account. One customer/acct can have several product Ids.
I need to create a mailing that will have rich text in the body and list per account/customer the products they have.
I keep running into having the rich text(body of letter) showing each time the product Id is listed. Do I need to create something in code first? Like an array with the product Id so I can have it as one variable per account/customer? If so, where should I create this? In code, macro or expression builder?
Getting kind of frustrated I guess. I'm tempted to write something in C# as I have enough knowledge I think to make this happen, but I prefer to keep it all in Access. I might also be asked to keep it in access and c# is not what is used currently where this project is being built.
Rogue:
You should use a page header on your report containing the formatted customer/account info, probably: "Dear Account:... " You're treating each id as a separate form letter. What you want is each customer to get the letter via treating the customer as a page header and group footer, while the id's go into the details.
Then, the one or more products would be in the detail section.
The closing of the letter would be in the group (customer info) footer: "We look forward blah., blah sincerely.....
Then, set the property of the group footer to "force new page after section", meaning when you get to a new customer, eject to a blank page and start printing another letter.
Hope this helps.