I have a "Status" combobox, I'd like the "Date Case Closed" field to auto fill today's date when "Status" combobox = Closed. The way I know how to do this is by using an IIf with Date() function, but, if I do that, the date is gonna keep changing everyday. Do I have options to do this?
I have created a form using access 2000. So far, this form already has data and dates in a combox in this format: mm/dd/yyyy.
In the AfterUpdate of the date combobox, I did this:
If graduation_date = #2/1/2004# then Text_Graduation_date = "dated this first day of february two thousand four." End If End Sub
In addition, I have defined many other dates as well using the code above. It works well when I choose the date form the combobox, the other textbox populates, but there are so many more dates in the combo!
Is there a way to auto-populate the textbox with the appropriate text as I scroll through the form?
I would like a textbox that is based on whatever is set in the Application Title in the startup function. I have seen threads for changing the AppTitle, but not just for a textbox base on AppTitle.
I have a data entry form for Table-A. After I enter an account on the form, I use the account to get a value from a different table and put that value in another combobox. I tried using a SetValue to fill the combobox. I put the SELECT statement from a query in the Expression parameter. But Access doesn't accept that Expression and produces an error message about "Forms" not being a field. This has got to be a common action in forms, so there must be a better way to do this.
I have a from based on a query. This form has a textbox called CUM_GPA which contains numbers in this format: x.xxx
In the After_update of CUM_GPA is this code:
Private Sub CUM_GPA_AfterUpdate() If Division = "GRADUATE" Then Honors2 = "" ElseIf Division = "UNDERGRADUATE" And CUM_GPA < 3.2 Then Honors2 = "" ElseIf CUM_GPA >= 3.2 And CUM_GPA < 3.5 Then Honors2 = "*" ElseIf CUM_GPA >= 3.5 And CUM_GPA < 3.8 Then Honors2 = "**" ElseIf CUM_GPA >= 3.8 Then Honors2 = "***" End If If Division = "GRADUATE" And School = "SCHOOL OF EDUCATION" And CUM_GPA >= 3.7 Then Honors2 = "+"
End If end sub
The textbox called Honors2 returns nothing. Any help is greatly appreciated.
I've got a main form (mainform1) and a subform (subform1). On the mainform, I have a listbox that is limits the user to choosing only 1 choice. The selected choice has an accompanied value - 1 through 6 - that is populated in a hidden textbox (txt1).
What I'm trying to do is to limit the number of records the user is allowed to populate based on the value in the textbox. I'm unable to reference the textbox value for some reason and i'm stuck. However, my code works when i enter an integer value, I.E.
Dim rst as object Set rst = Me.RecordsetClone If rst.RecordCount >= 2 Then Me.AllowAdditions = False
The code that i currently got going to reference the textbox that doesn't work is
If rst.RecordCount >= Me.Parent!txt1 Then Me.AllowAdditions = False
I have 44 checkboxes, each has a textbox next to it. What I want is when the user selects a checkbox, the textbox next to it will be enabled. Also, when the user unselect a checkbox, the textbox next to it will be disabled and any value entered is cleared.
Another way is whenever the user enters a value in a textbox, the checkbox associate with it is selected and vice versa.
I have a form with three items:a checkbox called "Check231", a textbox called "text921" and another textbox called "text762".
What I wish to do is: Enter text in textbox921, which stays the same as I scroll through each record. Then If checkbox check231 is checked, it displays text from textbox921 to textbox762. Textbox762 is bounded to the form.
Code: Private Sub Check253_AfterUpdate() If Me.Check253 = -1 Then Me.Text254 = DLookup("[Lot]", "[tblAutoGen]", "[Inuse] = -1") Me.Text256 = DLookup("[Exp]", "[tblAutoGen]", "[Inuse] = -1") Me.Text258 = DLookup("[Lot]", "[tblEthanol]", "[Inuse] = -1")
[Code] ....
I am using the code above on my form and it seems to be working. My question is there a way to populate a textbox (Text255) based off a login?
For example, lets say JSmith is loged in to the computer. Is there a way that JS could populate Text255? If then say JCarter is logged on, the JC populates Text255.
I have a textbox that is set equal to countitem field of a query. The query is based on a subform that exists on the same form. I am trying to update the textbox every time the number goes up or down on the query. Whenever I open my form the number for this textbox is updated. Can I update this field without having to open the form everytime?
I try to develop an access 2010 Forms that contains 1 or 2 charts. So my problem is, in my form I have 1 combobox and 5 unbound textbox. Inside Event OnChange combobox, there is function DCount that will setup value to the 5 unbound textbox. Until this point, the 5 unbound textbox is have its value.
Now I would like to create a chart that value are based on the 5 unbound text. How can i accomplish this ? i see in many articles, a chart row source is link to a cross tab query.
I have a form that has 3 combo boxes and a text box that I want to be a lookup. I have a little experience with DLookUp, but I do not think that will work here. The three combo boxes are linked to queries, and Tables. The first combo box is for choosing "Precious" or "Base" metals. The second combo box is filtered from the first and displays the "Metal Names". The third combo box is to choose a "Metal Market". There are currently four options for that. I want the text box to display the "Metal Market Price" based on the second and third combo box selections.
Here is a screenshot of the table with all of the metals and their market prices filled in with dummy values for now:
metals screenshot 1.PNG Metals screenshot 2.PNG
Here is a screenshot of the relevant Form: Metals form screenshot.PNG
Here is a screenshot of the Table that relates to the relevant form: Metals table design.PNG
Here is a screenshot of the Metal Market table that the Query is based on: Metal Market Table.PNG
I am creating a database for an annual golf tournament. Part of this is to allocate players to play off together at certain times.
I have a form bound to a table called tblteeofftimes. This form has five fields (continuous form) - four of which are comboboxes whereby user selects each player for the record (who will play together). The other textbox has the tee off time. the first tee off time will be allocated by user eg 7:00 am.
My problem is I need to update each ensuing record with a new time slot at 7 minute intervals. Rather than have the user populate the form themselves I would prefer this be done authomatically as the user moves onto the next record.
I'm trying to have a button in a form that, when clicked, will time stamp a text box already formatted for time. But once the text box is filled with a time, the button then disables itself for that record.
If I switch to another record where the text box is empty, the button will enable itself without closing the form, but obviously re-disable itself if I go to a record the text box is filled.
I'm sure I could use conditional formatting for it, but I don't think I'm going about it the right way. I already got a basic button built to timestamp.
I have a form that has a Combobox containing a '+' and a '-' field. Next to the combo box I have a text box that when input will contain a dollar amount. The Form is used as part of my job and there are many operators that will use it. The operators are not the end users of the form therefore it is necessary for the end user to see both the combo box and the textbox; I cannot just use a textbox. Is it possible to put a code somewhere that when the '-' is selected by an operative, the amount that is entered into the Text box will turn to red thus indicating a negative amount. I have tried Conditional Formatting but I am not too familiar with its workings. Your help in this matter would be greatly appreciated. Thank-you.
This is what I have. What I need is to populate in my form PartNo with the PartNo from tblfbompart and have it populate PartDesc from tblbompart and have it place the information into tblMadeToStockParts PartNo, & PartDesc. Also choose Model from tblModel using a combo box and placing ModelID in tblMadeToStockParts.
tblMadeToStockParts MTSID PartNo PartDesc Model Memo Attachment
tblfbompart fbompartID PartNo PartDesc Category
frmMadeToStockParts MTSID PartNo PartDesc Model Memo Attachment fbompartID ModelID
I have a form that currently uses a "catch all" table for listing available equipment to choose from for an equipment field. I call it tblEquipment. What I want to do is to make it so when I type a name in (1 of 35) in one field of the current record, the record source for the equipment field immediately looks at a different table that has equipment available only for that name. To do this I plan on making 35 different tables with limited data originally found in tblEquipment. I would call these tblEquipment1, tblEquipment2, etc. I do not use a sub form, nor do I want to.
So my questions are:
1) can this be done 2)If it can be done, how can I do it?
Is there a way in access, through vba or any other means, which would allow me to either enable or disable criteria in a query based on the value of textbox??
Like i have a query that displays bookings customer has made between two dates, so i made a query and in the starting and ending date fields i get the value from form. In case if the use does not enter ending date, i would like to run the query with starting date only that displays booking made after the starting date.
Currently the starting date criteria is set to a textbox of form, and so is ending date. So if customer selects 1st April 2015 as starting date and 30th April 2015 as ending date the query should display the bookings between 1st and 30th of April. And if the user enters only 1st April in starting date it should display bookings starting from 1st April onward.
I am fairly new to Access and trying to populate a text box based on whether other textboxes throughout the form contain a date or are null, so as I update the progress of work the textbox that I have located in the header will indicate the status of work flow, this is what I thought might work but I seem to be doing something wrong.
Code: Private Sub Form_AfterUpdate() Status = IIf([Date_Raised] Is Null, "New", "") Status = IIf([Date_Raised] Is Not Null, "Open", "") Status = IIf([Approved_Date] Is Not Null, "Approved", "") Status = IIf([Actioned_Date] Is Not Null, "Actioned", "") Status = IIf([Tested_Date] Is Not Null, "Tested", "") Status = IIf([Closed_Date] Is Not Null, "Closed", "") End Sub
I am designing a Web Database with a bound form to a submit table.
On the form, I have a combo box with selections that should influence the value to be displayed in a textbox also on same form.
For instance the combo box for Staff Name contains list of all Staff and I want the textbox to automatically display the level of the staff that was just selected in the combobox.
I know how to get this done using a combobox but my boss insists that the level should be automatically displayed in the textbox once combobox selection is done.
Using the combobox for level, I used the select statement in the RowSource property :
SELECT Staff_List.Level, Staff_List.Staff_Name FROM Staff_List WHERE (((Staff_List.Staff_Name)=[forms]![frmtest]![cboStaffName]));
I am in a dilemma of how to replicate this for the textbox because textbox only has control source and no RowSource where I can put this select statement.
Also, I will still need to bind this textbox to the submit table with the column name "TxtLevel" in the control source
Please see attached sample access db.
Also note that I cannot use action queries or VBA because it is a Web database and not a client database.