Modules & VBA :: Appropriate Watermark On Each Letter Of Printspool

Nov 29, 2013

I am using Excel as a frontend and Access as a backend. Now in the main form the user types in all the information about a customer and press Save. Suppose he stores 10 customers details so I am using PrintSpool Number . For those 10 records the printspool number will be save so that when the user press Print button then all those 10 Word document letters will get printed off. This works absolutely fine. Now I want to do the following checks in the code while printing:

It will make it easier on the watermark issue as it changes the below

First check
IF AXAFRIENDS = FLC use NO WATERMARK and END conditional (do not do second or third check)
IF FALSE move to second check

Second check
IF Team = LTC use LTC and END conditional (do not do third check)
IF Team = WINTERTHUR use WLUKCAP4 and END conditional (do not do third check)
IF FALSE move to third check

Third check
IF AXAFRIENDS = FRIENDS use PAP107 and END conditionals
IF AXAFRIENDS = DM use PAPSLD and END conditionals

AXAFRIENDS is the name of the field and the above conditions will result in different watermarks for each customer letter. My code doesn't work as required. Suppose 10 records in Access table have same PrintSpool number (Textbox1) ,then it should check for each record the AXAFRIENDS field value and display appropriate watermark during PRINT.

Code:
Private Sub CommandButton3_Click()
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim r As Long
Set cn = New ADODB.Connection

[Code] .....

View Replies


ADVERTISEMENT

Modules & VBA :: Display Watermark On Second Page Of Word Document

Mar 19, 2015

There are two pages in a word document. All the pages have same headers as attached in word document "Capita.doc". I want to display that header on just first page and on second one page, I want to display watermark stored in "J:PAP107.jpg". The following code displays same watermark on all the pages i.e "J:PAP107.jpg" but I want to keep the header as in the attached word document on first page only and display watermark stored in "J:PAP107.jpg" on second page.

Code:

Private Sub CmdPrint_Click()
Call WordSetupQA("C:CAPITA.dot", "J:PAP107.jpg", Format(DateSerial(ComboBox4, ComboBox3, ComboBox2), "mm/dd/yyyy"), pno)
End Sub

Code:
Sub WordSetupQA(fnTemplate As String, fnBackGroundPic As String, b As Date, a As String)
On Error Resume Next
'MsgBox txtbox
Application.DisplayAlerts = False
Dim strworkbookname As String
strworkbookname = "C:System1.mdb"
Set WordApp = GetObject(, "Word.Application")

[code]....

View 1 Replies View Related

Printing With Watermark In MS Access

Aug 29, 2005

I want to be able to create a background image as a watermark for Access Reports when they are printed. Now, as I can figure, the Report has a "Picture" property which I can use to set this.

The catch is, the contents of the background image is not static, it must be generated on-the-fly. (for example, it can contain the date of report generation) So, I think, that's ok. I'll need to create an ActiveX object that will generate the image, then I'll assign the image to the picture property using VBA.

Now, my concern is, can I set it up such that even if users create a new report in the database, this behavior can still be automatically done? Is there a way?

Also, would it be possible to set a background image for query results also?

View 2 Replies View Related

Storing The First Letter Of First Name, First Letter Of Last Name And Data Of Birth

Feb 19, 2006

Hi,

I'm designing a database in which the primary key is a combination of the first letter of first name, the first letter of last name and the date of birth.

How can I do that?

Regards,
CS

View 8 Replies View Related

Modules & VBA :: Use Only First Letter From A Word

Feb 27, 2015

I'm creating a folder with values from some fields. It all goes OK, but, the only thing is that the name of the folder could get to long.

We use words like "Prototype Model" "Prototype Review" Next Date Review" "Next Prototype Review"

How could I end up with only the first letter from each word like "PM" "PR" "NDR" "NPR" from a field called Type_Review ?

View 14 Replies View Related

Modules & VBA :: Getting A Drive Letter?

Aug 19, 2014

I have an MS Access database that sits in the users local area e.g. C:Users....

I have the following code which will open a user guide on a server shared by all users.

Code:
strFilename = GetUNCPath("T:") & "19_InformaticsInternal Offer Transfers" & "Utility User Guide.doc"

Users have different drive letters for the server name. In my case it's "T:" but for others it may be"S:".

Is there any code which would determine what drive letter each user has? The server name is

denasvf1acorpHR_GLOBAL_1HR_Shared_Service_Data

View 3 Replies View Related

Forms :: Watermark Text In A Form Field?

May 10, 2013

You often see (particularly on websites) a form field with greyed out text displayed in it, that disappears when typed over - so for example you could have name/address or whatever is supposed to be typed into that field showing.

I'm not looking for default text typed over or anything - a purely visual effect not stored in the tables.

View 8 Replies View Related

Modules & VBA :: How To Determine FlashDrive Letter

Apr 27, 2015

Is there anyway to determine the drive letter of a flashdrive inserted into a PC ? I have a backup routine that backs up a MS Access database to a flashdrive. I need to determine the flashdrive letter.

View 9 Replies View Related

Modules & VBA :: Fetch Initials (First And Last Letter) Of Username

Dec 24, 2013

How can we store the first and last letter of the username using vba.

E.g. my name is "Daniel Rawlings" then it should display "DR".

View 1 Replies View Related

Modules & VBA :: Creating Mail Merge Letter

Aug 20, 2013

I basically have a form which the record source is either from a table or query and all I would like to do is to have a button which when pressed will open up a previously created word template and insert all relevant fields into the template. First Name, Last Name, Address etc.

View 1 Replies View Related

Modules & VBA :: Insert Date If Letter T Is Pressed

Jul 17, 2015

On a form I have a textbox with a data type of Date/Time. If the user has the cursor in that text box and types the letter "t", I want to automatically insert today's date. I also want them to have the option of manually typing in a date, i.e. 05/12/2001 or use the Date Picker "calendar" item. This is using Access 2010.

View 3 Replies View Related

Letter By Letter Search Through A Table

Aug 21, 2005

ok here is what i want.. imagine a search box, just an empty text box that allows the user to type things into it...

there will be a simple table from the database behind it, here is the typical structure of a record

<Country>Poland
<Price1>60
<Price2>85
<Price3>95

in this table there will be say a 1000 of these records...
my user is going to have to quickly search through these records while on the phone to a customer, and quote one of the relevant prices associated with that country

what i would like is this most convenient system..
as the user types in the letter 'P' just below all the records with countries that begin with 'P' are displayed (with a scroll down arrow if needed)..as well as the 3 relevant prices with that record

if they then type an 'O' into the box (which will now hold 'Po') all the records with countries beginin with 'Po' will be displayed (eg Poland)

if they delete the 'o'. once again the displayed records below the box will return to just the countries begginin with 'p'

all that is needed is for the records to be displayed, thats it.. but the adding and deleting of the letters within the text search box will need to instantly manipulate this list..

i have posted on other forums, and have been told this can be acheived in access, is it hard?

View 9 Replies View Related

Modules & VBA :: Text Box Searches With Every Added Letter To String

Sep 16, 2014

I'm trying to add a search function the searches with ever letter I add to the string in the search box. if the string is not in the recordset then vbred the textbox.

Here's my code:

Private Sub txtGroupNr_KeyPress(KeyAscii As Integer)
Set RstRecSet = Nothing
Set db = CurrentDb
On Error Resume Next
If IsNull(txtGroupNr) Or txtGroupNr = "" Then
' MsgBox "Please enter a Group Number to use as the search criteria", _

[Code] ....

View 4 Replies View Related

Modules & VBA :: DLookup To Return A Value Starting With Specific Letter

Feb 25, 2014

I am trying to use a DLookup to search to find what block goes into the production of an item.

In a table called "dbo_vw_MCE_job_with_materials", each item contains a list of the parts which go into its production in a column titled "Expr1". However there are always more than one parts to this, with varying names.

What I am trying to do is to use a Dlookup to only return the first value which starts with B (as the block number is always the only part on the list which begins with B).

At the moment my DLookup would look ike this:

Code:
MixTypeTxt = DLookup("Expr1", "dbo_vw_MCE_job_with_materials", "[item] ='" & Forms![Theta Input]![ItemNumbertxt] & "'")

However I think as the item column contains the same item number in 8 columns, with different values in the Expr1 column, Dlookup only returns the top value "A-CF0057" (which is irrelevant as far as I am concered) - whereas I am hoping it will be able to pull the "B1499" value from the column as it is the only one starting with a B

Is there anyway to specify which value the dlookup function would return, or is there any way to apply some sort of permanent filter on my table?

View 1 Replies View Related

Letter Help

May 14, 2007

hi,
Im creating a letter. It is based on a query. I have some details that I'd like to display , one on it's own line. I cant print them out now, but they dont all fall on their own separate lines. How should I do that? If I put a carriage control at the end of each detail line, will it know to print each of the fields on its own line? I need advice . I tried doing a subreport -type letter, but it looks weird!

thanks!

View 1 Replies View Related

Letter Feeding From DB

Oct 16, 2007

having database full of names and info, how to create a letter which feeds from specific database records with one click, so it can be printed and post it?

cheers

View 9 Replies View Related

Starting Letter

Jun 15, 2005

I want a criteris in access to get the records having field 2 starting with "num". Num is example. I want to do withdifferent letters.

number
numbiur
numg
numds

the first three letter should be num in this example. i want for different words i.e, i need to enter the paramter message box.

View 2 Replies View Related

Letter And Query

Oct 12, 2007

Hi,
I'm fairly new to Access. I have few questions.

How to set up database so it searches through my table, finds the name and inputs it into letter in a space I want?

Where does this letter suppose to be located in the file?

Thank you

IOI

View 2 Replies View Related

Does Not Start With A Letter

Oct 15, 2007

Hi All:given a table with, let's say, Job Numbers that start with a letter (such as RES2345) or just plain numbers (such as 253180001 or 9817) how can I set the criteria in the query to just give me jobs that start with a number?I first trimmed the field to eliminate blank characters and then I used the Not Like "A - Z" but it still gives me jobs with letters at the beginning of the name.thanks for all your help in advance. :D

View 1 Replies View Related

Display Only One Letter

Jun 29, 2006

I am trying to get the firstname to only display the first letter in a report.

I have put this format in the control source =Left([firstname],1)

When I run the report I get error in the firstname field.

Any suggestion.

Thanks

View 2 Replies View Related

How Send The Letter

Dec 31, 2004

Hello all:



In order to set up an multi-receiver email program with ASP/AccessDB,

I downloaded “Beginners ASP mailing list program” “newsletter.zip”



After unzipped it, it contains 11 files. I put them all in the wwwroot of IIS.

I have made the address database “newsletter.mdb” successfully. The next

step is to send letter.



First using “newslettercreat.htm” to write a letter and then press “submit”.

After submitting, it prompt a IE page with address “newlettercreat.asp”, but

says: “The page cannot be displayed” and with following

information:

---------------------------------------------------

Technical Information (for support personnel)
Error Type:
Server object, ASP 0177 (0x800401F3)
Invalid class string
/newslettercreate.asp, line 22So, the letter can not be sent.

What is the ERROR of “Server object, ASP 0177 (0x800401F3) Invalid class string” ?

My OS is winXP pro, email program is Outlook Express. Who could help l me solve
this problem? Thanks!

View 1 Replies View Related

Edit A Report Letter

Oct 26, 2005

i'm trying to work with this database.
i want to know how to change a few things
we have a command button that generates a letter
i need to edit that letter as it contains names and numbers no longer in the office

is there a way i could find that letter

i tried to have sent to a .rtf file which i could modify, but that's tolerable for a dozen of recipient not 2 to 3 hundreds


thanks

View 5 Replies View Related

Generating A Letter From MS Access

Jun 20, 2006

I need to generate a pre-formatted letter from within MS Access, where the name, address and other information will be pulled from the current record on an Access Form.
Basically it is like a welcome letter I could send to any new client I enter into the data base. Since I am doing one letter at the time, mail merge in MS Word is not an option
What would be the easiest way to do this?
Thanks

View 9 Replies View Related

Letter Storage & Retrieval

Nov 6, 2006

I am not sure whether this is a problem with MS Access, Visual Basic or Windows.

I have taken over supporting & developing an MS Access 2000 DB for a small charity & am not an Access expert or a programmer. The Application includes processing to create, amend & store retrieve standard letters based on a Word document called MyMerge.doc. The operating systems is Windows XP for the PCs with a MS Server 2003.

Each letter is allocated a number ‘CallID’ which is used to retrieve the letters later. The letter text is in MessageC.

The VB code to store the letters (Save As) is

Dim strTest As String, db As DAO.Database
Dim td As DAO.TableDef
Set db = CurrentDb
For Each td In db.TableDefs
If Len(td.Connect) > 0 Then MessageE = Mid(Left(td.Connect, InStrRev(td.Connect, "") - 1), 11)
GoTo jumpout
Next
jumpout:
MessageC = "%fa" & MessageE & "Db Letters" & MessageC & " " & (CStr(Forms!Contacts![PostalCode])) & " " & Trim(DLookup("[TitleType]", "Title Types", "[TitleTypeID] = Forms!Contacts![TitleTypeID]") & " " & Forms!Contacts![FirstName] & " " & Forms!Contacts![LastName])
objWord.Application.Activate
SendKeys MessageC

The VB code to retrieve the letters is

Dim MessageE As String, db As DAO.Database
Dim td As DAO.TableDef
Set db = CurrentDb
For Each td In db.TableDefs
If Len(td.Connect) > 0 Then MessageE = Mid(Left(td.Connect, InStrRev(td.Connect, "") - 1), 11)
GoTo jumpout
Next
jumpout:
Dim WordApp As Word.Application
Set WordApp = CreateObject("Word.Application")
WordApp.Visible = True
WordApp.Application.Activate
MessageE = "%fo" & MessageE & "Db Letters*" & CallID & "*.doc"
SendKeys MessageE
Set WordApp = Nothing
GoTo Exit_Command53_Click

The success rate varies from PC to PC and user to user. It will work with one letter and not the next. It is very difficult to identify a pattern. When the Save As does not offer the expected name & path, the Application (or operating system?) offers to save ‘MyMerge’ to the user’s My Documents folder.

In that case I tell the users to correct the path themselves and save the document under the CallID. Theoretically, retrieval should work since this uses the CallID and wild cards. Sometimes it does but often it will instead retrieve a document in the user’s My Documents folder. If it does go to the right folder, you sometimes have to replace the last wild card with ‘.doc’. I have tried replacing the last wild card in the VB code with ‘.doc’ but this does not work!

Finally, I alone get the message ‘Save failed due to out of memory or disk space’, neither of which is true. This makes it very difficult to continue investigating the problem. If I use a copy of the DB on my hard drive rather than the network I can save but not retrieve.

View 2 Replies View Related

Form Letter Ideas

Feb 5, 2007

I want to pick everyone's brain on this one, because I'm not sure what I want to do can be done very easily.

I have a database that tracks client information for insurance policies. I'm going to be giving it to other agents, many who are very computer illiterate. One of the requested functions is for them to be able to create form letters from the database.

So, I'd like some ideas on how to do that. Ideally, I'd like for there to be a form that someone could load some letter templates, but also tweak them or even create new ones that can be saved. It would also need to have "merge fields" much like you would in Microsoft Word. Basically since every agent will want to have their own letters, it needs to be easily editable.

Is there an easy way for a computer illiterate person to just select "interest letter," change some wording, and have it merge into a report? Or, is there an easy way for someone to get access to the merge fields if they were to do a Word mail merge? I don't really want people trying to find the right tables/queries amidst all the different tables in the database.

Or, throw out some other ideas. I'm open for most anything. Thanks in advance.

View 4 Replies View Related

Append A Letter To Autonumber?

Feb 2, 2005

Is it possible to append a letter to the front of an autonumber (which is also my primary key). eg: E568
:rolleyes:

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved