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 have a Form opening from Access Options. I would like to close this Form using the Timer. The following is the code I have used but it is not working.
Private Sub Cover_Page_Form_Load() OpenTimer = Timer End Sub Private Sub Cover_Page_Form_Timer() If (Timer - OpenTime) = 5 Then DoCmd.Close acForm, "Cover_Page_Form", acSaveYes End Sub
Next question. If I can get this to work can I then use a DoCmd to open new Form within the code above or do I need a new process.
I have a onclick tied to a label (for decoration purposes) that when clicked it launches VBA that essentially updates a form. All that part works except it will not recognize any changed value of the field I was last in?
Just to try to explain best as I can what happens.
- Form gets opened - I change field (quantity field) - I click the Label - It reverts to pre-existing value.
if I click off of the text field first then do the onclick - it recognizes just fine.
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.
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 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 am creating a form utilizing all of the fields of my table (table1). I want the form label names to be from the description of the fields from table1. I have over 50 fields and was wondering if I could do this automatically.
Example:
table1 Field: Description: Policy_Date Date policy began
Form Label: Text Box: Date policy began Policy_Date
I am trying to use a tabbed form, but the labels that are not associated with a text box or other control (like titles, etc) seem to aquire hyperlink properties which blink horribly when the cursor enter and leaves the label area. The two hyperlink properties are blank and I sure don't need them for anything. I tried associating the labels with a text box (which already had a label normally associated with it) and the hyperlinks and blinking goes away, but Access will only let me associate one label per control. When I have the same situation but not on a tabbed feature the hyperlink property is there, but no blinking occurs. I really - really would like to be able to use the tab style for these very busy forms. Can't imagine why a non-associated label must have hyperlink properties, or why this happens on tabbed pages and none others. GRRRR! HELP!!!
Hi there, I have created a form containing contact details for a 100 or so different people/companies. I want to have a button that will allow me to print an address label for the current displayed record (e.g. when I find the company I wish to contact in my form I wish to click [Print Label] and then get this company's address printed on my label). Have some programming experience but not sure how to go about this in access?
Also as an aside question, is it possible for me to display a list in my form instead of individual records. What I mean is that I would have Name, Address, etc as titles accross the top and then would have a list of all records below these. Then I could click on a record to get more detail and also click on one of the titles to re-order the data by this field?......I know these are pretty big questions but a pointer to somewhere with this info or a sample app doing something similiar would be great. :)
I'm new here, mostly learning to do stuff by trial and error. I have a sneaking suspicion that I could easily search out the answer to my question if I had the right vocabulary, but I don't think I do...
Anyway, my question, hopefully you can help me with.
I've got a tabular form that has a couple of comboboxes, and then a text label:
ComboA....ComboB....Label
What I'd like to do is change the label for each row based on the Combobox data...
That's what I want. How I'm currently doing this is having a Sub called whenever the Combo boxes are changed, to change Me.Label.Value to 3, in this example. Of course, what instead happens is I get...
Which is not what I want at all. Is there a way to change the value of the label in(for instance) the second row, without changing /all/ the labels in the continous form? I'd be really handy to know how to do that, but I just can't puzzle out a way.
If that's not possible... Any other way to get my labels to display the information? Part of the problem is that my function relies on information stored in variables in my form, and I'm not sure I can access those just from the source propery of the label... What I need, essentially, is to put in Label's value the result of MyFunc(ComboA.Value,ComboB.Value,formvariable1,for mvariable2).
I am creating a database to house all the information for a box content label. For any given product it could have multiple items that go on the label.
I would like to setup my form so that I could type in the Model # once and then type in each item that would go in the box. I don't mind typing in each item individually and then pressing an "add" button. But I would like it to show everything that is currently on that box content label and be able to delete items out of the label.
Is this possible? What would be the best way to do this?
I have a userform that pops up when I am implementing a VBA subroutine. The nature of the form is simply to update the user what progress through the operation the code is using a label called lblProgressText.
So, I have a form called frmProgress and in my loop I use:
The lblProgressText control just wont update (but earlier today it was so maybe I have broken something).Btw, all this code is run from a Module, not in the form object.
I tried this code to change the label to display the full name of the state on the form. Is there a shorter way than putting 49 more states after the if?
[CODE]Private Sub cmdStates_Click() DoCmd.OpenForm "frmChurchesAll" DoCmd.ApplyFilter "qryFindState" lblTxtSt = txtState If txtState = "FL" Then lblTxtSt = "Florida" End If lblTxtSt.BackColor = 15658720 lblTxtSt.Visible = True lblStatesof.Visible = True lbAllChurches.Visible = False End Sub /CODE] D7
I have a text box in a form, in which users enter updates. I would like that text to become the caption on a label in a printable report. How would I write the VBA to do this?
I am trying to make a label visible on a form during print if a field has "like a string". We use a form so that it prints 3 forms to one page (They are tags for units for repair). I can get the label to be visible in the form view but when I print, the label is visible on every record where it is only visible on the current record in form view. My goal is to have the label only show on those records where the condition is met.
Here is my code that works in form view only: (It is to designate easier a warranty tag from a new repair tag)
Code: If Me.Problem_Description Like "Warr*" Then Me.lbl_w.Visible = True Else Me.lbl_w.Visible = False End If
I have attached an image of a tag sheet Tag_Sheet_W.jpg. As you can see if I got my desired result only the first tag would have a W.
I have been tasked with creating a tool to analyse mobile phone bill data and present the analysis, and our recommendation, to a customers. Being new to Access (other than basic tuition) this has been a slow uphill task, which is finally nearing completion, however there is a problem which I have not yet been able to overcome.
The requirement is for the DB to open first on a splash screen (lets call it Form A) with fancy picture where our customer is selected from a combo box, the customer is then telephoned, a linked computer screen is established and our staff then click "Go" to proceed to a second form (Form B) showing an account overview and more details.
The problem I have is when "Go" is clicked, the second form loads via on click event, and even populates the correct customer in its combo box. Unfortunately that is as far as it gets - the combo does not look up the information. The customer needs to be selected again for the subforms and subreports to load with the customer overview. To clarify, form B just sits there blank until the customer is re-selcted from the combo box in form B.
This code works well and frmRepair opens with the updated label caption. The original value was "Return/repair Information"
A few other things need to change on frmRepair depending on this caption as well as the values of some other fields, so I use the following code in the onload event (although I later tried the onopen even)
Code: 'Disable labels button if there is no RMA and the item is a repair MsgBox Me.lblmain.Caption If Me.lblmain.Caption = "Return/Repair Information" Then Me.txtRMA.SetFocus MsgBox Me.txtRMA.Text
[Code] ....
However, I cannot get this to work as the "if" statement always returns "Return/Repair information" and not the modified caption. The message box confirms that this is the case.
I suspect that this has to do with the point in time that the frmRepair loads or opens and when my code enters the modified values.
I am using Access 2010 - Version 14.0.61.29.5000 (32-bit)
I am building a custom Export Wizard to export data to Excel using the Report Wizard for the basic ideas.
All I am trying to do is have a [Back] button on a form to open another form and close the current form.
Private Sub cmdBack_Click() DoCmd.OpenForm "frm_ExportWizardPage2", , , , , , Nz(Me.OpenArgs) DoCmd.Close acForm, "frm_ExportWizardPage3" End Sub
The new form is opening but then the current form is not closing. All forms are the same size, shape and positioned centrally although this should not make any difference.
Could this be anything to do with which form has the focus when I open the new form?
I have a form, which is comprised of a sub form, and some of the text box controls sided with a button, and the event had been written to the button.
Now, to give a note on how had the sub form had been created is firstly taking a clone of the "Payments" table and using it as a datasheet, and then create a sub form in the form, it works fine
I have a form based on a table called tblListMaster and I want to allow users to open up another form showing all the members of one of the entries in that table so I have added a button called 'Show List Members'.
The list members form which I then want to bring up is also based on tblListMembers (it's a master-detail form). When I hit the button to open up the list members form I get an error message saying that the table is already opened exclusively.
I can understand why I get that message so I thought I would be cunning and create a dummy form which I open up, passing in my list id in the openargs (at that point I also close the original form) and then from that dummy form automatically open up the master detail form and close the dummy.
Code in List Master form
Private Sub cmdListMembers_Click() ' open up the list members form
I'm creating a database to track new policies request. I have a form in datasheet view that displays a list for all Initial Review and Draft status. I would like to click (... or maybe double click) on the Policy Name field that will display all fields into single form that is link to PolicyID ... to update any info needed. In other words i want to click on that record to be display in actual form.
Private Sub PolicyName_Click() Dim stDoc As String Dim stWhere As String Dim strsql As String Dim DB As DAO.Database
Fields: RecordDate Department DepartmentNumber 7 text fields 6 memo
What I am looking to do is be able to click on a combo box for departments so that once a department is selected, the latest record for that department is populated in the form, however, it is opened as a NEW record so that when any changes are made to the information in the form to the text or memo fields, it is saved as a new record.
I'm having a lot of trouble with this. Thank you very much in advance for your help.
:rolleyes: Hi this is my first time using this forum, I hope someone can help. I have a form 1 and I want to open another form to display data specific to the record showing in form 1.
I have done this many times successfully but now I am getting an error msg "The sepcified field '[UnitID]' could refer to more than one table listed in the FROM clause of your SQL statement.
I have tried everything but cannot solve this one. Any suggestions?
I built an info application for a friend in business. Its based on a kiosk style menu with selections, and when a button is clicked it executes "FormOpen" and brings up a second form with the results in it.
Its important for this application that they are two seperate forms which display the results, lets call them form1 and form2 for this exercise.
My problem is that when form1 opens form2, it LOCKS form1. And if you are to try and select a list menu, or click a button on form1, when form2 is concurrently open, it 'beeps' with no function. Whether it be by .disabled or whether its some sort of record lock (to stop a person from editing in two places at once), I'm not sure.
Basically, form1 never needs to have records updated, its the kiosk remember ie. form1 serves as a menu. But when form2 is open i would prefer it if they could could still click buttons on form1 to execute filters for the query i have on form2.
I've tried fidding around with the .disabled property on form1, and then i also thought about the record lock and tried DISABLING data entry on the first form so perhaps access could work around. Nothing has worked. There is also nothing in the book that i have on access.
Please help!!! You will be much loved. Even if you just tell me its not possible then i can sleep easy.