Change Field Value On Change Of Other Field In Form
Apr 2, 2008
What I want to do is following.
In form ASSIGN(fields are takedate and inout) ,if TAKEDATE is different then 0 then set value of inout field to 1
My VBA knowledge is poor cause i dont think this should be hard
Is the a way of changing the fields selected in a query by a form.
I have a form showing how many people need to do each module. Each textbox is populuted by a count from the table.
The idea is simply to avoid having 26 queries based on each module. Is there a way to have the field name changed via the form.
I have used the on dbl click event to pass the field name to a hidden field on the record. I just need to pass the data in the hidden field to the select query.
Right now one of the tables in my query has multiple years across the top (as the fields), 2010, 2011, 2012, 2013. Each year contains different rates that get applied to labor hours.
I would like to know if there is a way to have a form change the field in my query. I have attached a word document showing print screens of what I mean.
How do I change a txt box to a memo field on a form? (I need to allow for more than 255 chars...) I've already set the backend DB (sql server) to accept the many chars, and the linked table access see's the datatype as memo. But I can't figure out how to get a memo field on the form, or how to change the current txt box to a memo control to support the extra characters.
I've been looking for 20 minutes... I guess I never used a memo field before, since I can't find/see how to set this.
I need a query's field to change to what is selected in a combo box.
Example,
I select product 1 in the combo box on a continuous form, after the update there is a requery. The form now displays the data from product 1.
I have tried putting [forms]![form1]![combo1] into the field box of the query. But this only makes the form display "product 1" in every row, it does not take any data from the table.
I'm setting up a college database. On my enrollment form i have the following fields
Enrolment_ID Student_ID Course_ID
I'm receiving the error in my Student_ID field. It's telling me a related record is required in my Student Table.
The drop down shows the student name/date of birth/Education number
But if i set it to just show the ID it works fine, is there a work around for this as it will make life a lot easier for the dropdown to display the student names rather than the ID?
The dropdown is based on a query i have of accepted students....
Any way to change the default way a field is selected in a form so that it doesn't highlight all the text when you tab?I have the standard black text on a white background but when the whole field is highlighted it looks ugly and I think is quite difficult to read until you click into it.
I have a continuous form with a text field that says "Select". There are two other fields, one of which is Brand. When the Brand Combo box has nothing in it I want the text box to appear (instructing the user to select a Brand) But once the user selects a Brand and goes to the next records, I would like the "Select" in only that record to become not visible. I tried conditional formatting but can't apply that to an unbound control ( or at least it is grayed out when I select the text box) and any other possible solutions I have found changes all of the selects - not only the one in the changed record.
My DB has many (!) forms that are based on Crosstabs queries. The headers are years, and therefore my formfields has controlsources like 2014, 2015 and so on.
Example:
The table it comes from looks something like this:
The crosstab then takes the EndYear as a coloumn header. Then my forms use these fields, now named 2014, 2015, 2016 .... and give me a nice looking table showing the accumulated "end" for multiple projects.
The problem is when the year changes after 31/12, all fields must manually be changed. This means I have to manually change 2014 to 2015, 2015 to 2016 and so on in all of my formsfields controllsource.
I have played around to find a way to change the source of the field, and hoped I could say something like =year(now()) and for the next year say =year(now())+1 but this only returns that year as a value, and not as a controlsource...
The query functions nicely (ive changed the system time, and it has no issues with this structure), but the forms source is still in the previous year, and returns and error (of course).
When the year changes past new years eve, so will the headers (fieldname) change... but how to make the form change fieldsource?
I would like to change the property of a text box to Visible and Required when a user chooses a specific value in a drop down box of a different text box. Is this possible using a macro or some other way?
I have a report that is looking up min and max quality specifications for a product. The table with the specifications has a Yes/No check box field for when the specs are defined as "Internal". So the table looks like Product/MinValue/MaxValue/Internal
I want the report to display "TEST AND RECORD" when the Internal box is checked where the MinValue and MaxValue (that are stored in the table) would be displayed otherwise.
in a continuous form i want to click on one record and have the one field change the background colour to highlight it. When I use the code: Field. BackColor = vbYellow it changes the background on all the records. Is there a code to say only for the record with focus?
I wish to change the backcolor of a field on a current record being dispalyed in a 'multiple items' form. However when using me.A.backcolor = makes refrence to all fields called A on the 'multiple items' form and therefore all fields change colour not just the current record.
I have a form I would like to validate input on. The field UpdatedResponsibilityCode can be updated but it can only have certain values based on the PaymentResponsibilityCode. Is there a way to force this validation?
If UpdatedResponsibilityCode = 4 then PaymentResponsibilityID can not equal 1
You will see it is a simple problem if you know what your are doing.
When entering the joining date I would like the Status to change automatically to Member and when the renewal date is reached I would like the status to automatically change to Renewal but I am unable to work out a formula for this.
Hi. I have a main table (with other tables related to it). It has the 255 max number of fields. (I know... But bear with me.)
ANyway, I need to change some field's size to smaller sizes. But if I try to change them, even 1 at a time, I get the cannot do because I have too many fields defined.
Hello. I'm triyng to change every field format in a Form each time I jump from one field to another. I want it to get grey and bold when it got the focus
I managed it with a GetFocus and Lost Focus for each field but whena form has a lot of fields it gets "a lot" of programing.
Is there a way of doing it another way, for instance On current
Thanks for all of the help you have already given me.
Here's another.
What I'm trying to do it get a field, which is a combo box, to pop up a warning when someone tries to change it. I'm trying to keep people from unknowingly change the name field of the time sheet. I only want the warning to show if the field being changed already has a name in it.
Here is what Ive tried.
Private Sub Employee_BeforeUpdate(Cancel As Integer) If Not IsNull(Me.Employee) Then MsgBox "Are You Sure?" End If End Sub
The warning works, but it shows up regardless of the field being empty or filled.
I'd like to have it so I get a msgbox using vbyesno to give the user a choice whether to keep the change or accept it.
Any help would be greatly appreciated. Thanks again!
I have a similar problem, I'm fairly new to ACCESS and am learning it is vastly different than EXCEL that we use (we are upgrading to ACCESS to track our "in" and "out". I have set up a ACCESS database to track our barge loading and pumping, on the delay we enter reason for the delay but if no delay occurs it is left blank. How can I get the field to change colors if information is entered and left alone if none is entered. Quote: Originally Posted by shamrog12 Make sure to dim recItem1Value and backg in the appropriate area
Try this: Code:<%recItem1Value = lcase(Recordset1.Fields.Item("RecItem1").Value)backg = ""Select Case recItem1Value Case "x" backg = " style=""background-color:red;"" " Case Else backg = ""End Select%><!-- whatever code here... //--><td<%=backg%> nowrap><input name="txtField1" type="text" onChange="RecUpdate value="<%=(Recordset1.Fields.Item("RecItem1").Value)%>" size="4"></td>
I have been researching changing the field type of a table to Hyperlink and have been unsuccessful.
Everytime I add a field to a specific table the hyperlinks get busted. What I am doing programmiticaly is: 1. Deleteing the field 2. Re-creating the Field (text) 3. Concantonating two fields into the new field 4. Create a second field (hyperlink) 5. Copy those recrods into the hyperlink field 6. Delete the first 7. Rename the hyerlink to the original feild name
I get this to work but the hyperlinks are still broken.
Programmatically: If I Create the new field Concantonate two fields into it
Then Manually Change the field name from Text to Hyperlink everything works great.
QUESITONS:
WHAT CODE is being run whern you go into the properties of the table and change the field type from Text to Hyperlink?
Is there any way to change a field name in a table and have it propagate thru queries, forms, reports etc. Right now it messes everything up when I try it.
On a table I have a field labeled "Interest", and it is for what you would expect.
I have the data type set to Number, and the format set to Percent. For some reason I cannot change this field, it keeps resetting the value back to 0.00% even though I type something else in.