Forms :: Address Labels - How To Keep It From Overflowing To Push Down The Next Line
Feb 11, 2015
I am trying to generate standard Avery 2160 address labels. Fonts are small enough to allow for up to 4 print lines none of which quite touch. Players have entered their own names and addresses via a website form, so I we never quite know what is in the fields. If the player has a foreign address, it will all be entered in the address field, whereas US addresses have 1 or 2 lines in the address field, and city, state and zip in their respective fields. Line 1 is set as name, no shrink or grow. Line 2 is set as address, shrink and grow set to yes, and line 3 (text4) is set for city & state & zip, concatenated and trimmed in the query, shrink and grow no. The detail OnPrint event is the following:
Code:
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Me.Text4.Visible = False
If Len(Text4 & vbNullString) > 1 Then
Me.Text4.Visible = True
End If
End Sub
The problem: Any row containing at least one label with 4 print lines pushes the next entire row of three labels down one line, throwing off the spacing of the labels. If I set line 3's can shrink to yes, then the label following the four-line label never has its text4.visible turned to yes, and the other problem (pushing next row down one line) persists. These labels were originally set up via the labels wizard (Access 2010).
How can I keep it from overflowing from one label to push down the next line? This just shouldn't be this hard!
Is there an easy way to make a full page address labels (30 to a sheet) without having to create it by dimensions? I can't seem to get all the dimensions correct.
I need guidance on the best string manipulation functions (Instr, Left, Right) to cleanup my mother's Christmas address list of 300+ names.
I have successfully imported the text file into Excel and exported to Access; fieldnames: FULLNAME, ADDRESS, CITYSTATEZIP
I have found instructions on how to breakout FULLNAME field into FIRSTNAME and LASTNAME.
But within the FULLNAME field are many combinations of titles (Mr., Mr. & Mrs., Dr., HON.) with inconsistent periods applied.
Which one of string manipulation functions:
Instr Left Right
would be best for extracting these various titles from this name field?
I understand the concepts behind the above functions, but not enough experience using them to understand the tedious syntax or which string manipulation function would be best for extracting the varying title entries to a separate created field called TITLES.
So far, I have deduced this will be a multi-step process. But asking for guidance:
1.) Which string function is best suited for this? 2.) Example of the function syntax for an update query? 2.) Suggested order to administer update queries?...
to extract misc titles from the FULLNAME field.
I am a novice-casual Access user.
Thanks, Greg
(If someone would copyright these steps into a book called "Cleaning Up Mom's Christmas Address List"... I am sure they could retire from sales on Amazon. :-)
My database contains business names and addresses in separate fields (name, address, city, zip code, state, country)
Now I have to build the address block for labels.
If there were just US addresses it would be easy but a business can be located in any country with the problem being that countries require the block to be build in a specific way (order of city, state, zip code).
In some cases a particular section has to be upper case as well.
Of course I can build it manually in a memo field but the with chance of something easily going wrong I like to automate it.
It does mean the same info will be stored twice which is basically a no no.
I'm thinking of making a separate table with records for all possible layouts and use those as a source for a memo field in the business table. However I can't oversee if that would work alright or not.
Or should there be a way to generate the blocks on the fly?
So I have the following query which works perfectly (and will be use to create a report) but when the query runs to create the report I also want it to mail merge some of the items into word to be used on address labels.
Code: SELECT Dunmow.Date, Dunmow.Undeliverable, Dunmow.Duplicate, Dunmow.[OTM with XXXXXX], Dunmow.[Landlords Salutation], Dunmow.[LL Address 1], Dunmow.[LL Address 2], Dunmow.[LL Address 3], Dunmow.[LL Address 4], Dunmow.[LL Address 5], Dunmow.[LL Postcode], Dunmow.[Letter 1], Dunmow.[Letter 2], Dunmow.[Letter 3], Dunmow.[Letter 4], Dunmow.[Letter 5], Dunmow.[Letter 6], Dunmow.[Letter 7], Dunmow.[Letter 8] FROM Dunmow WHERE (((Dunmow.Date)=DateAdd("d",-7,Date())) AND ((Dunmow.Undeliverable)=False) AND ((Dunmow.Duplicate)=False) AND ((Dunmow.[OTM with XXXXXX])=False) AND ((Dunmow.[Letter 1])=False));
So thats my query, What I want it to do is to take the following
I have to print address labels. 10 x 3.8 cm labels 2 per row 14 per page on an A4 paper. Pretty straightforward one should say. But no. I play around with the margins, column heights and widths, row and column spacing page size wasting time. Is there a hidden and not documented relationship between those elements? For example how is the column height and row spacing linked together? How is this normally done in a professional way?
How can I modify an Access mailing label report to accommodate a sixth line of address content? I used the Label Wizard to create our customer mailing labels (Avery 5160, size 8 Arial font), but the process doesn't seem to allow for a sixth line. First, I tried reducing the font size to 7; no improvement. Then I tried modifying the label report in Design view by copying the =Trim([Address1]) control, creating room for an additional control, pasting the copied control, and editing it to read =Trim([Address2]). The additional line will display in Print Preview and print out on a label sheet, but it forces the text for subsequent rows of labels downward, completely trashing the alignment. Finally, I tried altering the Can Grow properties of the Detail section of the report (both Yes and No) but neither got me the desired result. At size 8 Arial font, it seems there should be sufficient room to print all six lines on the label. Any ideas? Thanks!
[Solved] I have a report that is based a query formed from 2 tables. The query pulls the address from one table for a client from the other table. This address then appears on the report. There are 6 lines for the address: Company Name, Contact Person, Person's Title, Address 1, Address 2, City/State/Zip. I have this working fine, until an address is shown where there is no Title, or Address 2. Then a blank line is shown. Any suggestions on how I can eliminate the blank line if there is no information to show?
I'm trying to have a command button send info on the form straight to Outlook as a meeting. So far, the code below works apart from the address bit. I need the code to automatically add the same 2 email addresses as recepients everytime.
Error message highlights the red line below with the following message:
Runtime error '438' Object doesn't support this property or method
I'm new to VBA, so don't understand what is wrong here. The reference is set, I've tried different permutations of the "To:" & "Recipients.Add" for the email address with no joy.
Code: Private Sub cmdSend_Click() Dim outApp As Object Set outApp = CreateObject("Outlook.application") Set outmail = outApp.CreateItem(olappointmentitem)
I have a main form with 3 sub forms. The main form is tied to a table called QUOTES_MASTER. The first sub form is tied to a table called QUOTE_ LINE_ ITEMS_DIRTGLUE. It calculates the subtotal when selecting items. The relationship is one-to-many linked on QUOTE_ID.
The second sub form adds up total of all line items and is not tied to a table.The third sub form adds ESTIMATED FREIGHT to the PRODUCT TOTAL and is not tied to a table. how to get the values from the line items form inserted into the QUOTE_LINE_ITEMS_DIRTGLUE table as they are added.
I also want to insert the total value from ESTIMATED DELIVERED into the LINE_TOTALS field in the table QUOTES_MASTER.I tried this code on the product total sub form but it doesn't do anything and there are no errors:
Private Sub PROD_SUB_AfterUpdate() DoCmd.RunSQL "UPDATE QUOTE_LINE_ITEMS_DIRTGLUE SET QUOTE_LINE_ITEMS_DIRTGLUE.SUBTOTAL = Me.PROD_SUB WHERE QUOTES_MASTER.QUOTE_ID = " & Me.QUOTE_ID
I can change multiple things on a line graph with VBA.
Me.Graph47.chartType = GraphType ' take 65 for line with me.graph47 .SeriesCollection(1).border.Color = vbblue ' change the line color .SeriesCollection(1).border.Weight = LineWeight ' change the line weight to for example 3 .SeriesCollection(2).MarkerSize = MarkerWeight ' Change the marker weight, for example 4 .SeriesCollection(2).MarkerBackgroundColor = vbblue ' Change the marker color, .SeriesCollection(2).axisgroup = 2 ' put this series on the secondary axis end with
SeriesColection(1) is line with markers. This is correct.But now I want the seriescollection(2) without line, so only the markers. I cheched the MSDN site from Microsoft. The Excel trick with the macro does not work for me.how to hide the line with VBA for only SeriesCollection(2) in Access?
Hey Everyone. I'm a Novice so don't know if what I'm asking is either easy or hard to do. I have a DB for our record label. One table is Incoming Materials, the other is Assigned Materials.
I need a button that when pressed takes all the data from one table and put into the other. Both tables contain the same fields although Assigned Materials has alot more obviously.
Anyone done anything like this before or have any clue how I can do this. Keep in mind that I'm an annoying Novice. Thanks for any help. I promise I won't be a Novice for long
Have I pushed Access to the limit? Everything runs great, although I do have some hecups, once in awhile but nothing major.
I'm at 100 megs. I have 40 users with read/write. I have maybe 300 users with read only.
The IT people told me that Access is not design to do this kind of work. I mention that it been running for over 7 years, with very few problems. Those problems I created myself.
I guess I need some feed back from what you think.
I have an access table which lists a customers address, however, if the customer has a temporary address it will also list that on a separate line -
CustID Address Type 1234 5 The Street P 1234 12 The Street T 2345 13 The Road P 3456 12 The Avenue P
Where P = Permanent and T = Temporary
I want to set up a query to show the permanent address where there is only one address, but where the customer has a temporary address also, I want to list the temporary one instead.
I have 3 text files, I receive daily, that I need to import into my database. Until we upsized to SQL, we were manipulating the data in Access, and everything was fine.
These three files do not come with a primary key, and we have to insert one row of information into one of the tables. Once we get the flat files, we use our import specifications to set the field types, etc.
Our process works like this: 1. Get the files and import them by spec. 2. Compare one of the import tables (importTable_new) to the current table and write the differences to a third table. 3. Delete out the data from the old tables and copy the new information into them.
This process cannot change due to the way our system is setup. Our data gets filtered prior to us receiving the file, so we have to make sure we always use the most current data from the extracts. We have saved previous data in other tables, so I am not worried about that part.
My problem is this: I am using a DSN-less connection (ODBC) to the SQL server and if I try to run a query that updates the SQL-tables, using a local table, it errors out. There are a myriad of errors that came out of this, I have tried to hunt down what I could and solved a fair amount. However, I continually get:
MS Jet OLEDB 4.0 cannot be used for distributed queries because the provider is used to run in apartment mode.
I have done the steps on the SQL server to remedy this error to no avail (turning on ad hoc reporting, etc).
I have tried OpenRowSet, but that did not work out all due to the continual error from the server.
I tried to use an SSIS and it drops the import specifications on import to SQL from Access.
All I want to do is take three local tables and paste the results in the matching 3 SQL tables in the backend, without deleting the tables (or if I have to delete the tables, to be able to re-create them with the right field types and settings). The tables are identical in field type, name, size, etc.
I have created a report that includes 4 subreports. The subreports are displaying survey results from 4 different survey channels. New survey data is added to the tables monthly so the subreports will grow in size. Is there a way to have the subreports automatically resize and push down the subreport below? Currently what is happening is a subreport will grow and the additional data disappears underneath the next subreport. Is there a better way to create a report that displays information from multiple reports that will change in size?
Using the code below I am able to open an explorer window from access and select most of a file path. The part I am not able to get is "LN" which is a field in my forms. I need to be able to pull the current LN number into my Modules file path. How do I do this? Is it easier to go by ID or the actual field I am looking for?
Code: Function Loan_Folder_Search3() Dim rs As Recordset Dim LN As String Dim Client_Name As String Dim RetVal As String Dim LFPath As String
[Code] ....
Currently, it keeps pulling the first record, no matter what record I'm on.
I have a command button that opens a report. The report has many subforms in it. I am sending open args which existingstewardship. I want one of the labels of the labels to be visible if the me.openargs = "existingstewardship". the code is not working. I have tried to debug when I do this I have found the open args are null and I am wondering if the open args are null is this because they were sent to the main report from the command button and the subforms in the main report do not get passed the open args.
Does anyone have any idea ? how I could make the box visible or not visible in subreport from the command button. The other option I have would be two different reports. Thanks PWF
I cannot link a label with a control. I don't know how it happens, or rather how I do it, but on various forms the label is not linked to the proper control. I try to do it by clicking on the warning popup on the right side and indicate I want to associate the label with the control, but sometimes it just doesn't work. That is, if I set the visibility of the control to True or False depending on the value of another control, the label still appears.
I've looked in the properties of each, but there doesn't seem to be anything there to indicate the link or association. Other than laboriously copying and pasting the label back on the form with the control highlighted, is there any way else to do this?
I have a problem with the connection between the labels and fields in designing my form.Is there a command do eliminate the association between the two? If not I was thinking if there is a problem to delete the labels and make new ones but by doing this Access (2010) says the label is unassociated.
Has A 2013 changed the way that labels are aligned, or do I need to look for some other setting. Normally in A 2010 and 2003 I could highlight a row of label click size/space > equal vertical and it would move the labels.
I want to be able to do something to several labels, e.g. make them invisible, using a FOR loop. They are all named similarly, with ascending numbers on the end, e.g. lblName20
Say I want to make lblName20 to lblName40 invisible. I need something along the lines of:
Code: Dim labelname As String For c = 20 To 40 labelname = "lblName" & c labelname.Visible = False Next c
Of course, that doesn't work, because it doesn't recognize the string as a label name. How do I go about this?
I have an option group with 4 options and I want them to display traffic light colours when an option is clicked. So if option 4 is clicked it displays red, if option 1 is clicked it displays green, however, once clicked the colours remain, and dont disappear when I click another option and they remain for all records.
Private Sub Frame742_AfterUpdate() 'Select Case Me![Frame742] ' Case 1
On the sub form I am selecting products that I am selling to a customer whose details appear on the main form.
The products on the sub form are selected from a combo box. This section is in datasheet format.
Depending on the product sold some of the labels on the sub form are not relevant. And when this is the case I was thinking maybe the label is rendered invisible.
Maybe this is not the best way to handle this - or is it. It certainly is expedient.
Perhaps as well when the label is rendered invisible entry of a value into the corresponding text box becomes impossible.
Is there a better way to handle this?
How I can render the label invisible and disallow data entry depending on the value of the combo box.