Label Printing Solution
Jun 8, 2005
I need to try and create a simple form that a user enters data into and then hits a print button and the text they entered is printed in a particular way.
i.e. they type in someones name, job and company into 3 fields and then hit a print button and this then prints :
PERSONS NAME
JOB TITLE
COMPANY
We also need the print to be formatted a particular way but that is another issue
This is for a small exhibition we are trying to run and we need something to print visitor badges with
Has anyone got any ideas that can really help as we have been let down by someone who was going to do this for us
View Replies
ADVERTISEMENT
Jul 6, 2012
Iv got a form with various data on it. The data comes from a table.I wish to print the detils on my form onto a label (10cmx12cm) as it appears on my form. I understand the best way to do this is via a report. So, i have created my report from the same table that my form gets its data from. I have laid my report out (visually) in the style i wish to appear on my printed label. Then i have added a cmd button to my form, which carries out the 'print report' code. However, this code sends all the records in my table to the printer, where as i only want to print the current record. Any suggetsions?
This is my current print code behind the cmd button on my form:
Private Sub PrintLabel_Click()
On Error GoTo Err_PrintLabel_Click
Dim stDocName As String
stDocName = "PalletLabel"
DoCmd.OpenReport stDocName, acNormal
Exit_PrintLabel_Click:
Exit Sub
Err_PrintLabel_Click:
MsgBox Err.Description
Resume Exit_PrintLabel_Click
End Sub
View 2 Replies
View Related
Jun 11, 2013
I've created labels in my database and when I print them on a label printer, I get a blank label in between my printed labels. I've checked the printer settings and properties and can't find anything. I've also checked the database properties and can't find anything. Is there something in the database that I'm missing?
View 6 Replies
View Related
Jun 10, 2013
I have a report that should print on labels ready to be stick on a book, but how can I tell the report to start from 3th row 2nd column so I do not waste any labels?
View 4 Replies
View Related
Nov 8, 2004
Ok, I've run into two serious problems in testing, and another question that I'm hoping you guys can
help me solve. Below my questions is the code used for making the search query/email program.
Problem #1: In testing, this search program only is working for me for new data. Any data that I had
in the database prior to implimenting the program will not move past the search stage. In other words, I
will do a search, it will find the emails and bring them up in a box, I hit "OK" and it gets hung up and won't move on
to opening up a new Email with the addresses implemented. However if I enter new data in the database, say with a weird
name so its only bringing up the new entry and no old entry, it works fine and opens up the new email.
Problem #2: Items I would like to search like check boxes. Say I have a check box "Donor", this is listed in the database
as a 1 or 0. I can't have my boss searching 1 or 0. Is there a way to change this to, say, being recorded in the DB
as a Yes or No. That way he would check to search "Donor" and type Yes in the search box and this would search the DB
"Donor" column for "Yes" and bring up the results.
New Question: My boss and I reviewed the form as it is so far yesterday. He was asking if I could add a Print Labels option
in there. I'm wondering instead of adding another seperate search box and all that mess for a labels search print, can I rather
add two check boxes, one labeled "Print Labels" and the other labeled "Email". What this would do is depending on the check box
you selected it would either run the search and email like we have it, or clicking the other check box would run the search and print
labels.
Quote:
'Author: Michael Walts, but use it as you like'Important information! this code requires a reference to the Microsoft DAO object library
Option Compare Database
Option Explicit
Private Sub cmdEmail_Click()
'will hold the dynamic SQL query
Dim strSQL As String
'will hold the WHERE clause portion of our SQL query
Dim strWHERE As String
'will hold all the recipients of this message
Dim strRecipients As String
'the recordset we will use to get the emails of the records that match our criteria
Dim rst As DAO.Recordset
'if there is input in the search criteria, then we will run the query and send the e-mail
If txtSearch <> "" Then
'if you have more buttons, just add mosr cases (the value of the radio button
'= the Case number, so Value of the State radio button is 1, etc.)
Select Case opgSearch.Value
Case 1
strWHERE = "WHERE State = '" & txtSearch & "'"
Case 2
strWHERE = "WHERE City = '" & txtSearch & "'"
End Select
strSQL = "SELECT EMail FROM tblUser " & strWHERE
'run the query and get the results into the recordset
Set rst = CurrentDb.OpenRecordset(strSQL)
'Loop through the recordset and add all the EMails
Do While Not rst.EOF
strRecipients = strRecipients & ";" & rst!EMail
rst.MoveNext
Loop
'remove the first ; from the strRecipients
strRecipients = Right(strRecipients, Len(strRecipients) - 1)
MsgBox strRecipients
DoCmd.SendObject , , , , , strRecipients, "News Letter", txtBody, False
rst.CloseSet rst = Nothing
End If
End Sub
'stops a ' entered in the field from breaking the query
Private Function SQLSafe(safeMe As String) As String
SQLSafe = Replace(safeMe, "'", "''")
End Function
View 1 Replies
View Related
Aug 4, 2006
I have n horizontal labels named Label_1 to Label_n. I'd like to assign values to the label captions by using a loop.
Something like:
For i = 1 To n
Set Label_i.Caption = i
End
However, this doesn't work. Message "Object required".
Any suggestions?
View 1 Replies
View Related
Feb 25, 2014
I was having trouble just setting each report with a particular print method - for some reason they just kept forgetting their individual settings and resorting to default on the machine.
This meant reports were printing on the wrong paper, or the wrong size paper, the wrong orientation and some times refusing to print if it couldn't find the paper (which is useful in runtime as it doesn't display error messages)
So I used Reports(rpt).printer properties (I forgot where I found this) to hard code the printer properties into each print command... this meant I had to use another function to insert the variables.
So all I had to do was say:
Code:
PrintMe("Invoice","InvoiceID",iID)
and a report would print to exactly how I wanted... but it's just too slow!
See attached for full code, I have a niggling feeling it may be the function: PrinterOK, to make sure the printer exists or not.
Code:
Function PrinterOK(sPrinterName As String) As Boolean
Dim MyPrinter As Printer
PrinterOK = False
For Each MyPrinter In Printers
If MyPrinter.DeviceName = sPrinterName Then
PrinterOK = True
Exit Function
End If
Next
End Function
I know it's the printing code, because if I stop the printing and just preview then it shows up almost instantly.
View 1 Replies
View Related
Feb 12, 2008
Hi,I'm looking for a bug/issue tracking solution done entirely in MS Access. Does such a thing exist?My requirements are that it must need only Access, and be accessible in a shared environment solely by opening a .mdb file from a shared folder. It must support various issue lifecycle related things, and the stuff those tracking systems do in general.It may or may not be commercial software.If anyone knows of such an available solution, please let me know.(And yes, I've searched on Google, and haven't found anything worthwile, so that's why I'm asking here now.)thx
View 5 Replies
View Related
Jul 26, 2007
Hi,
I haven't worked with Access for a while, now i'm working on a project and just can't handel with a calculation. I have somewhere the solution for my problem, I had use it other times, but now i just don't know where to find that sample database.
I have 2 tables: tblProjects and tblCosts
tblProjects
ProjectID
ProjectName
ProjectValue
...............
tblCosts
ProjectID
CostName
CostValue
................
What I want is to calculate the Benefit=ProjectValue-CostValue.
I know it is possible, in other cases I have used some union queries, sum calculation and I had my results very simply. But now, as I said before, can't find that piece of SQL. :(
Any solution is appreciated.
Thank you
View 3 Replies
View Related
Feb 12, 2008
Hi,
I'm looking for a bug/issue tracking solution done entirely in MS Access. Does such a thing exist?
My requirements are that it must need only Access, and be accessible in a shared environment solely by opening a .mdb file from a shared folder. It must support various issue lifecycle related things, and the stuff those tracking systems do in general.
It may or may not be commercial software.
If anyone knows of such an available solution, please let me know.
(And yes, I've searched on Google, and haven't found anything worthwile, so that's why I'm asking here now.)
thx
View 4 Replies
View Related
Mar 14, 2006
This is for anyone who has made a form with a lot of check boxes and wants to make a report out of them thats decent.Hopefully this simple example file is enough to assist people.Keywords:Checkbox Checkboxes report check boxes box
View 1 Replies
View Related
Jan 1, 2007
Hi the specialists.
I do not want security on any of the files in my computer.
I'm placing this in "general" because I'd like a direct and practical answer, please. And if there is none, please say so. Computers are immensely complicated and I am just a little bit tired of people superciliously refering the uninitiated to "Microsoft's FAQ's" That source is to most normal humans as obscure as the software programming itself.
I have also searched this source and Google for hours, without getting an intelligible answer.
This is my problem:
I am the only user and administrator on my computer.
I have a back-end file which is easily accessed through the front-end.
.... but
I cannot open the back-end to access the tables directly.
I get the following error message:
You do not have the necessary permissions to use the 'C:Documents and SettingsAll UsersDocumentsAccessThingsWORKLOG_be.mdb' object. Have your system administrator or the person who created this object establish the appropriate permissions for you.
Of course the person who created this back-end is me, but I have no clue what I did, because it is at least two years since I created it.
Could someone please help?
I have tried to use the "shift", click method. It does nothing - just gives me the same message.
Pierre.
View 4 Replies
View Related
Jul 8, 2005
Link to the original thread (http://www.access-programmers.co.uk/forums/showthread.php?t=89557)
I have realized what I was doing wrong and thought that I would post the solution in case anyone else does the same trying to implement security. First off thanks Pat Hartman for the input. You were right on there needing to be a cutoff and now one is added that ensures they can't edit punches after payroll has started.
I had the right idea with the many to many relationship to get a list of buildings. What I was doing wrong was joining the resulting table to the shifts table. Instead the correct way (well, it works anyways) is include WHERE Building IN (SELECT ....) in the sql where the select statement gets the list of buildings numbers that I have access to.
Now the list is limited to the buildings that they have access to and when you delete only the shift table is affected because none of the other tables are joined.
View 1 Replies
View Related
Dec 23, 2005
Hi Everybody. I've been nosing around here because I have this difficult problem with a database design. I modelled my program in UML so I have a class diagram. Now I want to create an access database out of it, but this is too hard for me.
It's about a school project for flowers. Every year, they make a cross plan. This cross plan contains crossings. Many crossings. And every crossing exist from 2 genotypes. A mother and a father. With this crossing several new genotypes are created. How on earth do I realize that in a database? A plant is male as well as female so you don't need to indicate which sex it is.
Further more I want a genotype to be judged on his characteristics by a user as much as he wants to.
Well...I hope someone can help and if you have questions about it don't hesitate to ask.
Thanks in advance!
Gr Billy
View 4 Replies
View Related
May 12, 2005
Good afternoon all,
I have a A97 Db. On one of my forms (see attached screen pic) I have a field "Payment type" for either Cheque, card of Account. There is no code or functions behind it, it just stores a value.
Trouble is my users keep forgetting to fill it in!
My first (and easiest) solution would be to make "Payment type" a required field. However. The field will only be filled out under certian conditions.
That is if the "Status" field value = "X" (drop down box holding two values "X" and "Y").
What would the code be? I presume it would be in the Form "after update" field? Would read somthing like:
if [Status] = "X"
and
if [PaymentType] = "Null"
then
mssg box "Please enter payment type"
I have a vba book on order to start learning, but as you have probably guessed, I have not received it yet! :)
Any pointers or info would be much appriciated. Many thanks :)
View 1 Replies
View Related
Jun 29, 2005
I need a little bit of advice on this one.
I have 2 tables that are used for different things, one table, denial data, is used for tracking all requests. It is updated with the form, Daily PAs. On the form are 2 buttons, each running a macro. One button exports the data to Excel by running a query to specify the date range. The second button is my problem. It also has a macro, with an append query, to append only requests that have been denied to my second table, Denials, to be later updated with additional information. The append isn't working because I am getting three different errors, a "type conversion failure," "key violations", "lock violations" and "validation rule violations." Now, I know I can begin working out these violations and get it working, but I'm sure that involves a lot of time and coding. I would really appreciate any other suggestions to accoplish the same tasks. I need to keep the approved requests seperate from the denied requests for auditing purposes. Thank you for your help.
View 7 Replies
View Related
Oct 3, 2006
Hi all,
Please forgive a newbie that asking the stupid question.... i just wonder is that anyway to set the date format to short date with instead of mm/dd/yyyy to dd/mm/yyyy to let the user to keyin?
Thanks alot.
View 3 Replies
View Related
Dec 30, 2004
Hello All
I am in need of a lot of help. The situation is as follows I have a table with users that have certain classes that they have to take and in another table I have the dates that these classes are offered. My problem is I want to find a way to map all the students to their required class by scheudling them into the required classes taking into account date conflicts and classes required before taking a certain other classes. I guess my question is if there is any possible to do this in access without me phyically having to schedule each users required classes to the correct time making sure there are no date conflicts. Any help would be highly appreciated because we are talking about 3000 users that need to have schedules and that is extremly time consuming if I have to sit here and do the schedule for each user. Thank you in advance for your time
View 5 Replies
View Related
Mar 19, 2006
I want to use a counter increment so that I can loop F1 to F3 I don't want to create 3 (actually I'm trying to avoid creating 50) If/EndIf blocks of code. Can someone help me?
' Initialized memvars
F1 = "PO_Num"
V1 = "0001"
F2 = "Vendor_Num"
V2 = "0002"
F3 = "PO_Num"
V3 = "0001"
TableName = "MyTable"
QueryStr = "UPDATE " & Tablename & " SET "
mCtr = 1
Do While mCtr <= 3
If Not IsNull( Eval("F" & Trim(Str(mCtr)) ) Then
QueryStr = QueryStr & Eval(FValue & " = '" & Eval(VValue) & "';"
End If
mCtr = mCtr + 1
Loop
The way that it works:
Do While mCtr <= 3
If Not IsNull(F1) Then
QueryStr = QueryStr & F1 & " = '" & V1 & "';"
End If
If Not IsNull(F2) Then
QueryStr = QueryStr & F2 & " = '" & V2 & "';"
End If
If Not IsNull(F3) Then
QueryStr = QueryStr & F3 & " = '" & V3 & "';"
End If
mCtr = mCtr + 1
Loop
View 1 Replies
View Related
Aug 18, 2006
I need help on an update query. Case is an automatic letter generation for particular document which has revisions like 00 or 01. So when this is done, on click, open an update query to update date and letter no in main table against that particular document. I made the query but does not work and says result should be an updatable query. I am posting SQL below.
UPDATE [MDL-10], TRANSMITTALGEN, [Transmittal Record Query] SET [MDL-10].[REV 00 SUBMISSION] = [Transmittal Record Query]![MaxOfTransmittal Date], [MDL-10].[REV 00 SUBMN LETTER] = [Transmittal Record Query]![MaxOfTransmittalNo]
WHERE (((TRANSMITTALGEN.REV)="00") AND (([MDL-10].[Select])=[Forms]![TransmittalGeneration]![Text2]));
Please help
View 1 Replies
View Related
Nov 4, 2006
I have almost finished my current database but I was asked to create a log table/log file that would list changes made to every record. Now my current database don't allow duplicate records, so any advice pointing me into the right direction will be helpful. I have ran through the search area and found nothing that I can use. Can any one help me out in this specific problem. I picked up a few books and none of them give examples of such things. Thanking you all in advance...
View 14 Replies
View Related
Mar 7, 2007
My database contains documents which are entered randomly (i.e. - not in any particular order). But then, for my reports, I must show these documents in “Document Number” order, once I have gotten them in the order I want (usually by date or other criteria).
In Access 2003, (in query mode) all I had to do was enter the number 1 in the first “document number” field, then number 2 in the second document number field. Then, by pressing and holding the “down arrow” key, this field automatically filled in the document number consecutively from 3 through whatever number of documents I have in my database. Very quick and efficient. I’ve had Access since the very first edition (1996 I think), thus I don’t remember how I was able to get the “Document Number” field to “self-fill” in the query mode, but have been doing this for years.
Now, I cannot get Access 2007 to do this, no matter what I do, thus I am forced to manually enter the number for each document.
Question: How can I get the “Document Number” field to fill-in the series automatically (in query mode) by pressing and holding the ‘down arrow’ key? As I said, the information is entered at random and has to be sorted later by document number, thus I cannot use a Primary Key or AutoNumber for this.
View 4 Replies
View Related
Oct 11, 2005
Hi there,
I have built a Access solution for a music school, It was installed on 3 machines.
I'd like to protect my database from installing onto another machine without my permission.
I did install database as a mde file so they cannot see my codes. However, if they copy the database to another machine (esp. another machine in different school) they can use my software without my permission. How can I prevent this? If they copy the mde file into unauthorized machine, database should work as a demo version (such as limiting the number of records in tables to 10). How can I do this? What should I check, hd id, mainboard serial or what? Is there any ready solution (at least modifiable) for that kind of problem?
regards
View 14 Replies
View Related
Mar 7, 2006
I have searched the forum but have failed to find the answer to my problem. I have a front end ms access 2000 solution that I distribute to user PC's with an MDE back end data base on a server.
I now need to release a new version that includes changes to forms, queries and tables.
However there is data in the original mde data base I need to retain. Is there an easy method to migrate that data to the new data base. I have changed some relationships but this should not affect data integrity - most change is related to adding new fieldsto existing tables or new tables (no previous data).
If I create a new empty mde will I be able to import old data into it from previous mde?:confused:
View 2 Replies
View Related
Mar 7, 2005
I'm reading lots of threads about various problems with autonumber, and I encountered a corruption in a very beginning database myself, using the autonumbered field as a sequential file number, my primary key. So, my question is.....how is the very most simple, NOVICE, way to use DMax (step by step on what to write and where to put it) to create a sequential file number, starting from 00001 and ad infinitum until I go out of business :)
I simply want a field called "file number" that will effectively auto-number, without the dangers of autonumbering crashes etc.
Thanks for your suggestions!
View 3 Replies
View Related
Apr 29, 2008
I have unique situation not sure how to achieve this in Query.
For understanding I have attached mdb has following tables
'PR_RPT'
'SYS_RPT'
'TIME_RPT'
Final_PR_RPT
'PR_RPT' and 'TIME_RPT' has unique ID called as 'PTUNID', My Final goal is Final_PR_RPT.
I have created a Query1, which Look into 'PR_RPT' and 'TIME_RPT' and does a match on 'PTUNID' and populates all the 'SUM HR' Field Values from 'TIME RPT' table to matching 'PTUNID' in Column 'SUM HRS' similar to Final_PR_RPT,
In Addition to that what I am trying to do is
1- Look for PTUNID from PR_RPT to TIME_RPT if that doesnot match then
2- take Unmatching 'PTUNID', Look for which 'Project LEAD' owns the 'system ID' From 'SYS_RPT' Table then
3- Populate the unmatched 'PTUNID' 'SUM HRs' from 'TIME_RPT' Table against that 'Project LEAD' which Owns that unmatched system and has same ProjectID in PR_RPT in new column as Wrong SUM HR and WRONG SYS ID
Final_PR_RPT, shows how the result should stored.
I tried using IIF Statement but I believe I am not doing it right.
Thanks
Niri
View 4 Replies
View Related