Changing A Label In One Record Of A Tabular/continous Form
Jul 28, 2006
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 trying to create a form that has a tabular main form and a tabular subform. All I can do is to create a main form that just shows a singular record (columnar). I want to be able to see say 10 records in the main form and 10 records in the subform. How do I do this?
i have a form the control source of form is getting information from table and the type of form is tabular i want when the user input for example 10 person into form when click in the button all the record stored from another table , how to do it ?
How can I indicate with a color change in the label, that a checkbox is checked? I've got it working ...sort of. but when the change occurs it's happening gobally - I want the label to color to apply only to the record I'm viewing. If the check box is checked then the color should be red, otherwise black.
My code is as follows: Active_Admission.Value = -1 Then
Label1177.ForeColor = vbRed
ElseIf Active_Admission.Value = 0 Then
Labe1177.ForeColor = vbBlack
Exit_Sub_Active_Admission_click: Exit Sub
End If
End Sub
Also, the condition only works with -1 and 0 - I've read in other places that the condition is 1 and 0. HELP!
Is it possible to use two color fonts on one label? I want to bring attention to the user that by clicking a certain button they can perform a search by "Name" and by clicking on the other button, they can perform a search by "Appointment".
I have a switchboard type form with some buttons. The two buttons in question are labeled, "Search for Appts by Name" and "Search for Appts by Appointment". I want to keep the "Search for" section of the button in black font, but change the "by Appointment" and "by Name" to red font.
I'm trying to make a field specific image on a tabular subform, so a different image appears on every row depending on the field information.
Currently my code displays the same image on every row depending on which subform row is selected:
Code: Private Sub Form_Current() Dim imagepath As String imagepath = GetImagePath & Me.Exercise & ".jpg" If Len([Exercise]) > 0 And Len(Dir(imagepath)) > 0 Then Image26.Picture = imagepath
I m new to access.I have a subform that is bind to a datatabel.I have provided buuton add and undo record to the user.
On the click of the add button i have written this code.
On Error GoTo Err_cmdAdd_Click
' Save any existing changes DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 ' Add record, go to it DoCmd.GoToRecord , , acNewRec Me!cmbTasklist.SetFocus
but if i clicks on it it says that acsaverecord method is not avialable now.In my other form its working fine.
I have another question also.How can i force the user checks in a continous form??Suppose if user enters value in the first textbox and closes it it saves it into the database but i want user to fill all the textboxes.so on which event i can apply these checks??
i have a continous form as a subform.I want users to edit this only if there is a particular value in a one textbox..say if textbox has value "A" user can edit it else he is not allowed to edit it.
so if i write code on the page load whenever it finds a value A it makes all the rows in the form editable but i only want those rows to be editable which have value "A".
Is there any way by which i can dynamically access the row ids in the continous forms.I am new to access though i have code in asp and asp.net. so just thinking if there is something similar in access also.
Hi All I posted this earlier but don't think I explained it that well, so here goes.
I have a main form which displays a site name, city, post code. I have 6 tabbed subforms which display a full record set of site name, address, contacts and telephone numbers for a client, site and other related data such as visits to sites and contract agreements.
I would like the main form to have a scrollable list of all the sites entered which will change the subforms to show the relevant detail for the first site in the list on the main form.
It works fine as a single form, I can use the record selector to find a site and all the relevant details change as expected.
I cannot change the main form to continuous as I get a message telling me I cant have this due to the subforms.
Is there a solution to this?
I'm fairly new to Access but can work my way through most things. I'm using Access 2000.
I have problem which has me stumped what i have is a from where I need to add a location -fine not too much of problem , I have a table of my most used locations (Based in the UK ) and I need to monitor these quite regularly so for my top venues I have in a table (makes sense), however sometimes I have an unknow location, and I will only use this location once,, now I don't want to add these locations to my main table of about 100-200 venues, so what i can up with is other venue option which allowed the user to overtype my venue box with whatever they wanted, my problem is that when i list more than 1 venue and one of the locations is not on the list, it enables all of the fields to be edited , I know its recordsets but cannot get my 'ead round this - to expand a bit
If its one venue then no problem, if its 2 venues then I have a linked table opening up tied to the main record as the index (usul stuff) and the table autonumbers happly ,i need somehow to get the line to lock just that 1 record not all of the record in the table for the main refernce - have i made any sense or am I losing it (its midnight here)
Having realised that unbound controls on a continous form all 'work together' -
I have decided to use a secondary form which allows the user to enter additional data for the current record on the main form. A command button press invokes the secondary form and using a filter is able to allow new data entry for the record / amend existing.
However, if the record is new - when the secondary form is closed and focus returns to the primary form - the read only controls that display the data entered, do not update to reflect the data entered. Yet, if the record is amended - the amendments are updated immediately on the primary form...!Why is this ... ??? I have tried forcing a refresh of the individual read only control concerned but to no avail.... Any ideas comments greatly appreciated.
Is it possible to have an unbound image control on a tabular form displaying a different image for each record ?
Actually i have tried putting some code on the onCurrent event, but it is displaying the same image in all records, depending on which record is current.
This is the code which i tried using:
Private Sub Form_Current() On Error GoTo Err_Form_Current If Not IsNull(Me.txtCountry) And Not IsNull(Me.txtCatalogueNumber) Then Me.Stamp.Picture = Environ("userprofile") & "My DocumentsDatabasesPhilatelyStamps" & Me.txtCountry & Me.txtCatalogueNumber & ".jpg" ElseIf IsNull(Me.txtCountry) Or IsNull(Me.txtCatalogueNumber) Then Me.Stamp.Picture = Environ("userprofile") & "My DocumentsDatabasesPhilatelyStampsNotAvailable. jpg" End If Exit_Err_Form_Current: Exit Sub Err_Form_Current: If Err.Number = 2220 Then Me.Stamp.Picture = Environ("userprofile") & "My DocumentsDatabasesPhilatelyStampsNotAvailable. jpg" Else MsgBox Err.Description, vbExclamation, "Error #" & Err.Number End If End Sub
Actually, the above code works fine for Single Form, but not on tabular form.
I have Form F_CashSalesHead with a subform F_CashSalesInvFoot with one-2-many relationship on their tables. Subform contains a checkbox field that I use to lock the record set (On a command button click it runs one update query to add value 1 to each checkbox to make Enable=False all the records of current invoice on the form).
One-2-many relation ship is made on InvNum field in both tables.
When I open F_CashSalesHead form, bcz of some code line I wrote on On Load event of F_CashSalesHead , at the beginning it give massage how many invoices are pending to lock and would you like to see. If click “Yes” to see list, it opens a small form that called F_Count_Unlocked_Invoices showing invoice numbers and unmarked checkbox which is pending to lock. This small form is based on following query,
SELECT DISTINCTROW T_CashSalesInvFoot.InvNum, T_CashSalesInvFoot.CashSalesCustomerName, Sum(T_CashSalesInvFoot.Lock_Cash_Inv) AS [Sum Of Lock_Cash_Inv] FROM T_CashSalesInvFoot GROUP BY T_CashSalesInvFoot.InvNum, T_CashSalesInvFoot.CashSalesCustomerName HAVING (((Sum(T_CashSalesInvFoot.Lock_Cash_Inv))=0));
This works fine.
What I am looking for is, I want to use the same F_Count_Unlocked_Invoices form for Credit Sales invoice also with the same trick. Because I don’t want to create another same form and write code that help to increase size of db.
Can it be done just by changing record source of form F_Count_Unlocked_Invoices? Or what is the way to do it?
Where do I put code to run over an entire continuus form. I have a yes/no on each record and it is controlled by an if statement. If I click on every single record it will run the code. I need it to check all the records in the subform. I have tried OnLoad, OnOpen, OnCurrent, OnTimer. None have worked. Any help???
I have a continuous sub form linked to a main form.
The fields on the subform are:
Quantity Part Number Description Code Price
I also have a total price field for each record the control source for this is =[Quantity]*[Unit Price].
I then have a text field to calculate the order total in the form footer control source is =Sum([Total Price]).
The problem that I have is if I change the quantity in record 1, the text field to calculate the order total does not update until I tab onto record 2.
Have searched far and wide for the answer and have tried all manner of me.[mytextboxname].requery to no avail - help!
I am trying to change the color to display when the order close to red.whilst leaving the open records as default. Iam attempting this on a continous form. Currently operating access 2000
I'm using 4 combo-boxes in order to filter a tabular form in access.
One combo box is for a company name the second is for a report type and the third and forth is for choosing years. I used VBA in order to apply the filter:
Each line works by itself but I cant figure out how to combine them together, or how to use "AND" between each filter so the filtering will refer all of them when I run the code.
I have a form that is linked to a table. tblContacts
On the form I have added a listbox which has every possible Contact (Name) listed. I wanted to be able to click on a contact name and then have the form bring up all the information related to the contact.
right now i have on the click of the listbox a msgbox that gives me the contact id associated with the contact name.
BTW, this is a project i am taking over from someone. If it was my choice I would be creating a web app.
I'm having a bit of a problem - I built quite a complex db that works great and I'm comfortable with code and access. But, I've been working with ASP for a while now and I think it has made me a bit fogetful re: Access.
If someone can point me in the right direction conceptually it would be appreciated. My system is primarily built around scheduling and I have created tables and web forms to interact with my current access database to allow our recources to check and confirm their daily schedules online.
My problem is on the Access side. I need to build a dashboard using a form that queries the table that holds our resources status information and will display whether or not they've logged in and confirmed their schedule. As well, I need controls on this form to allow me to update their individual schedules if it has been changed. Most of this is no problem, the big problem I'm having is the display of information and form interaction... Can I use a continuous form for this?
When I try to use unbound controls such as images - hiding/unhiding images depending on a specific records value (for let's say a traffic light that shows whether a resource has confirmed their schedule) - it seems that I can't control images, checkboxes, etc. for individual records on the continous form with code as all these unbound controls defualt to the value of the first record.
I have a continuous subform that shows records from a table [not the table the parent form is based on] - a check box, a text field with text, and a blank text field for notes.
When I click on one particular of the checkboxes I see in form view, I can make the notes field/s visible. Unfortunately, that means right now that the fields for all the records become visible. If at all possible, I would like to set this up so that only one particular text box becomes visible.
Could somebody please tell me if this can be done, and help me do it?