I'm doing up an order database that uses a report to display orders that are
faxed to the supplier.
When the report is first opened, it asks the user for the name of the
supplier (to print at the top and specify which orders to display), the date
(to also specify which orders to display), and the customer number (for the
benefit of the supplier).
Now, there are two main suppliers for this business, other suppliers are
used every now and then. Because of this, if one of these two main suppliers
is entered as a parameter initially, the corresponding customer number I
hard-code in should be displayed without having to ask the user for it. If,
however, another supplier is entered, it should ask the user for the customer
number.
This is all done in a label on the report. Currently, its control source is
set to this:
=IIf([Supplier]="supplier1","Customer
#123456",(IIf([Supplier]="supplier2","Customer #987654","Customer #" &
[Please enter customer number:])))
This works, but asks for the customer number regardless of the supplier I
enter initially.
I'm looking for a way to do something similar to above, but it shouldn't ask
for the customer number if I enter "supplier1" or "supplier2", it should use
my hard-coded values.
Any help would be much appreciated!
In code i have built a string variable called strRAG which is a combination of text "Me!lbl" and another variable called intSiteID, which forms for example label name Me!lbl51.
I have a form with loads of labels on it and what i want to do is use this string to set the BackColor of the label.
The code i use loops round building up different label names but i am have problems relating the strRAG detail to the form labels.
I have posted this question in VBA early this week but after looking at the wording i have tried to rephrase it.
Select Case Err.Number Case 9999 ' Whatever number you anticipate. Resume Next ' Use this to just ignore the line. Case 999 Resume Exit_SomeName ' Use this to give up on the proc. Case Else ' Any unexpected error. Call LogError(Err.Number, Err.Description, "SomeName()") Resume Exit_SomeName End Select
And the error came out, Label Not Defined. I've checked with "help", and it stated that
"The label must be within the procedure that contains the reference. Line labels are visible only in their own procedures"
Is there any missing references in the library I should checked??
:confused: i am using MS Access 2003 on WinXP. i have attached my sample database. when viewed in form view, notice that the form will flicker on mouse over. why is this happening? is there a solution to solve this annoying problem? please explain in details how i can solve this problem as i am new to access. thanx in advance :)
I had a subfrom with two combos and a label, -the user selects name or id from the combo and the label gets filled with information. -added a print this on the subform and I thought it worked but when I tested it it does not print the data, only a blank label and the two blank combo boxes...
I was wondering if there is an option to print the caption of a label, or if anyone knew how to fix the problem i have above.
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
I want to display the all the labels for a form in an other form. Is this possible. Basicly have a drop dow box that has all the forms in it and then based on the combo box list the label for that form.
Hi everybody, I am trying to personalised the way Access looks and in this specific case I am trying to open a form with a label:
I: I have added a "space" on the hyperlink address property which is changing the mouse pointer to a "pointing finger" when the pointer is moved over the label,
II: I have added the following code on the move event of the label to highlight the label when the pointer is on the label: Private Sub Option2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Me.Option2.FontBold = True End Sub
III: I have also added the code below on the click event of the label in order to open the form and change the pointer to an hourglass on loading time as the form can take up to 10 sec to open. Private Sub Option2_Click() DoCmd.Hourglass True 'Changes pointer to an hourglass Dim stDocName As String stDocName = "FrmSearchAssembly" DoCmd.OpenForm stDocName 'DoCmd.Hourglass false 'Resets it to the arrow pointer End Sub
Unfortunately the 3rd step is not working, the hourglass only appears after the form is loaded. Is anybody has any idea why and what should be done to get the hourglass to appear when the label is clicked until the form is fully loaded?
I am using the following code in the open event to set the gloves label on my form frm_Delivery_2 equal to the gloves label on form frm_delivery_1. I receive the error that the form frm_delivery_1 cannot be found. When I set the gloves label equal to another label or frm_delivery_2 using the same synax it works.
Private Sub Form_Open(Cancel As Integer) Me.Gloves_Label.Caption = Forms!frm_Delivery_1.Gloves_Label.Caption End Sub
What or where would I need to setup the code so that it sees the glove_label value on my form frm_delivery_1 and sets the glove label on my frm_delivery_2 equal to it.
I was wondering if it's possible to link a label on a form so that it automatically displays the contents of a field in a corresponding record?
eg I have a form for the rental of DVDs. On the form is a Text box labeled "RentalID", one for the "MemberID", both from my table "tbl_Rental". Below is the contents of a table displaying the dvds rented out for that rentalID. Is it possible to have a label or a piece of text that automatically displays the calculated field from a query that has that member's fullname in it?
I have a database of customers for which I want to print address labels depending on what group I have entered them in. There are about 30 different groups that they could be a member of. I have entered them in to groups by using "yes/no" fields on the customer table to indicate who is a member of which set. My problem is that I know how to indentify which group is required using sql
eg select surname,address from table where GP
where GP is one of the possible groups. I cannot however see a way of selecting the group variable from a form and entering into a query, so that I can print the required label set.
Can anyone please advise me on this or point point me in the direction of an example. I tried using a combo box on form but could not get it to pass the parameter correctly. Many thanks in advance.
I am attempting to place a label on the top of a tabbed form and I am having a problem. Here are the important parts of my database:
tblInstructors InstructorID Autonumber PK RankID FK to tbl Ranks LastName FirstName
tblRanks RankID Autonumber PK Rank
I have a tabbed form with a combo box for RankID and text boxes for FirstName and LastName. Obviously there is more information than this on this form, it is tabbed and I would like a label on top of the form that shows the name and rank of the person's record that is being edited or viewed while the user is on another tab. Normally I would use =[RankID] & "" & [FirstName] & "" & [LastName], however this isn't working since the RankID control is passing the Autonumber from tblRanks instead of the actual rank (yes this is military rank abbreviation). For example I get the number six instead of TSGT. I need to find a way to show the text value instead of the autonumber that represents it.
I have searched to the best of my abilities to find anything on this forum about this as I am sure it has come up before but have been unable to find anything.
I have rcently produced a label report for my Xmas cards, and I would like to add a picture to the label in the form of Father Christmas. Can anyone help me on this subject.
Just a quick question, I can't seem to get this right (as usual :confused: )
I have a form and I want the label in the header to display the text from a field in a related subform. I have tried the following syntax to no avail: =[Forms]![sfrmCompanyName]![LastName]
On a form I have multiple labels. In the Click event of all these labels I would like to call a generic function for futher processing. For this processing however, I need the caption of the label the user clicked on. How do I determine this caption?
Is there a way to make the text in a label smaller than size 8? I need to put some text on a form, but it's too large for the limited amount of space I have.