hello ,
I made a text box in my form , and I have a table with two records.
table:
name: yoav
phone: 055
I want the text gets the name yoav from the table.
I can't directly give the value beacuse text cannot get a record value.
I tried to use query but it doesn't help.
How can I do it then?
I have 4 fields that are unbound on a form. img1 img2 img3 img4..When these are entered they are all combined and autofill another unbound textbox = imagename.. what i would like to do is from this unbound textbox 'imagename' ..i would like to populate a textbox that IS bound called FileName
[Event Procedure] Private Sub imagename_Click() Me.imagename = Me.FileName End Sub
My database has Main form and a Sub form. On main form i place one unbound text box named investigations. In subform of which datasheet there is a column named TestCode. I want unbound text box (Investigations) to display row values which selected in a column (TestCode) of subform.for example:Investigation field should display "CBC,HB,ALP".
I have a Form Display Data in my Access Database, which is working really well. However, users was asking if there is a way we can make Font Color Could/would change if The text in A field or Any field in my display form contained the word "SAD or MAD". Is there code for such thing in display form?..
how can i disable a textfield or two in a form when the textbox is unchecked also how do i add a default value for it while the textbox itself is disabled, can i get away with it by adding a default value on the textbox?
I have a form with two text boxes and a button. I want to be able to type a value into the first Text box click the button and the second text box to be filled with the value which is stored in the Table.
The first Textbox is called barTxt, The second Textbox is called CustTxt The button is called SearchBtn and the Table is called BookInTable. I have been trying to use the code.
Code:
Private Sub SearchBtn_Click() DoCmd.FindRecord Me.BarTxt.Value, , True, , True CustTxt.Value = "SELECT BookInTable.Customer FROM BookInTable " & _ " WHERE Customer = """ & Nz(Me.BarTxt) & """" & _ " ORDER BY Customer" End Sub
This however instead of displaying the Value for customer which is stored in the BookInTable. Displays The code SELECT BookInTable.Customer FROMBookInTable " & _ " WHERE Customer = """ & Nz(Me.BarTxt) & """" & _ " ORDER BY Customer"
Is it possible to have the value in a text box be set automatically based on the value in another textbox?For example, Textbox Gender is Male, so Textbox Reference is Male.
Code:
IFF Me.Gender = "Male" Then Me.Reference = "Male" And Me.ID = "ea13-02c" Else If Me.Gender = "Female" Me.Reference = "Female" And Me.ID = "ea13-01c" End If
i have a form that contains a combobox and textbox.i want according to combobox choice a fixed template to be populated in the textbox and then can be edited (delete and add more text as needed) without changing the original template
I have multiple sub forms and want to add specific text boxes of different sub forms into one another sub form. Then all sub forms are incorporated in one main unbound form.
I am running in to a brick wall with this. I have an unbound text box with the control source set to =IIF([text42]=0,0,[text42]/[text44])*100 and in continues to return a #name? error.
I am not sure how to get this expression to work. I have even tried to put =[text42]/[text44] and I still get the #name? error.
I'm using the following code to set text box fonts in all my forms. Problem is a couple of my forms have a combo box which I need to reference here but not sure how. I want the Combo Box font to be the same as the text box's. Not sure how to check to see if the control is a combo box.
Code: Public Function TextBoxProperties(frm As Form) Dim ctl As Control On Error GoTo TextBoxProperties_Error For Each ctl In frm.Controls If ctl.ControlType = acTextBox Then ctl.FontName = "Calibri"
I need to make the text size smaller to fit everything on the screen (users use 17" monitors..). I have gone into each form and subform and changed the text size for each text box to 9, but when I view them in form view the size has not changed ?
Also .. is there any way to make the autocentre option actually work as it's name suggests !! ? it does in most cases centre horizontally, but never vertically, quite often putting the top of the pop up form over the ribbon bar.
I would actually like to be able to totally remove the ribbon bar so that only the database forms are the only thing the user sees.
I vaguely remember being able to do this in Access 97 (Which was the last version I used - a long time ago !) but this seems to be more difficult in 2010 version.
I have a form with numerous text boxes, combo boxes etc. I want to make two of the text boxes active (visible) only if the value entered is "Yes" in the text box above. Otherwise, if the value entered is "No," I want these other text boxes to remain hidden. For instance, if the user selects "Yes" the DVD is out on loan, I want three other text boxes to appear so that the user can enter the borrower's name, date borrowed, and date returned. Thanks!
I have a form which allows me to search between two dates by using two text boxes. The code for the query behind the text boxes is:
Between [Forms]![name of my form]![name of text box1] And [Forms]![name of my form]![name of text box2] and it works great. However, I was wondering if it was possible to use the same two text boxes on another form running from the same query, or would I have to make another query for the other form? I have tried to use "or" in my statement, eg.
Between [Forms]![name of my form]![name of text box1] And [Forms]![name of my form]![name of text box2] Or Between [Forms]![name of my 2nd form]![name of text box1] And [Forms]![name of my 2nd form]![name of text box2] but when I try the text boxes it says "Enter Parameter Value".
I am trying to create a simple form with tabs. I want each tab to read from different tables.
I created the Form I droped the Tab Control on it and made 2 more tabs
Now I want to add Text Boxes and populate them with values from a specific table. In the Control Property of each Text Box I set it to =[Table]![Field] and I get #Name?
I cannot seem to link the Text Box back to the specific table.
Once I do that I want to be able to Goto Next, Goto Previous etc.
I have a volunteer information database, and I am working on the form that will show the details of each volunteer's hours worked, among other things.
I've attached screenshots of a more or less final version of the Relationships (I've tweaked it a little in the last day or so but nothing life-altering), the section of the form in question, and a query I wrote (probably incorrectly) that does return hours on a given month sorted by NameID, which is useful, but doesn't put the information into fields like I'd imagined I could. If I can't figure out how to make what I'd like work, I guess I could just put a subform that displays the results of the query, but I'd rather do it another way.
Obviously switching out the months, but I'm getting the response of #Name? in each field. No syntax error so I'm not sure if I have something configured incorrectly in the text boxes or if there's a problem with the function.
I have two forms where in first form i have options for second form. In first form i have a text box and its value is copied to second form using this code
Code: =Forms![FirstForm]![Counter]
But when i open second form using button in first form the vba message that counter value is empty. I used vba if code in second form on counter
Code: if counter.value = 1 then solo.visible = true end if
I have a text field with receipt numbers in the format 0001-00000### and I would like my data entry form to default the max existing value + 1.
If max value is 0001-00000201, then the new record should suggest 0001-00000202.
The problem is that if I use the "max" function, it does not work (I think because that function is intended for numbers, not text strings).
Table: RECEIPTS Field: receiptnum
I also have a query with just one field that lists only the receiptnum unique values so that I can use them in comboboxes in other forms... it may be useful I guess...
I am new to access but I am creating a form on access 2010 for a Pass Request. On the form so far I have two cascading combo boxes that work great so far. The problem is that once a name is selected from the second combo box(cboFullNames) I want a textbox underneath to populate(txtOrg). I have tried using requery and refresh but it never works. The only thing that seems to pull up the information is pressing the refresh button.
I have a form with text boxes bound to a table. There are two fields, ProposedSalary and ProposedIncreasePercent, that should not be populated at the same time. It's either one or the other. I've tried to add a validation to the percent field to check if the salary field is empty or has value. That did not work for me and I removed the validation. Ever since, if I try to input a percent value into percent field, it changes to zero on exit. I think i might have tried to add that same validation to the form itself but i checked all the properties and I don't see anything. I've looked at the VBA code view and did not see ProposedIncreasePercent referenced anywhere. I created the document for the form through the document analyzer and searched for that field and couldn't find it. So, I can't find anything coded anywhere to change that field to zero but yet it does. I've also tried to remove the field and add it again and it does the same thing.
I got sidetracked during my lessons by a discussion of a login form. So I built one along with a user table, and lo and behold it works. I got to thinking about how a user might change their password without support from an admin or someone else getting into the table and changing it for them. I figured I could launch a password reset form and let the user type in their new password. This works too. What I am hanging up on is this: I figured that the user should be prompted to retype their new password then run a little vba to compare the two values, and if they match, write the new value to the field. I tried an If statement that checks for equality, but I don't know how to go about configuring the code to update the field in the table.
I have 480 textboxes in my form. What I am looking to do, is that any time any of thest textboxes are clicked (or double clicked) I want to then get the name of that textbox saved into a variable.
So I have created a public variable called tbName.
What I need is this:
- if the active control is a textbox then - tbname = active control name.
It is important that I dont just take the active control name all the time as I want all controls other than textboxes to be igored. Secondly, under what event would I even put the code? Would it be the form Click event?