How to solve "Unbound Textbox"

I have a basic database, contains:
1. ID
2. Name
I want to have a textbox for user enter amount of money and then click a button. Then a report appear (must have a textbox value in form Input - do not tell me add this textbox like a filed in DB).
I try 1 day but it did'nt work.

Sponsored Links:

Related Topics

How to solve "Unbound Textbox"
I have a basic database, contains:
1. ID
2. Name
and Form input. I want to have a textbox for user enter amount of money and then click a button. Then a report appear (must have a textbox value in form Input - do not tell me add this textbox like a filed in DB).
I try 1 day but it did'nt work.
Help me to solve this problem


password validation
I have an unbound textbox on a form for users to enter a password. When the user clicks on a button on the form, I want to compare the values entered in the unbound textbox to the word "chicken".

Can I still compare the values in the unbound textbox even though it's not bound to a field of a table?


combobox - unbound column
I am trying to work with an unbound column in a combo box. For some reason I have trouble every time I try to work with this.

I have two columns in a combo box on a form. After I select an item I want the bound column (2) to fill in one textbox on the form and the unbound column (1) to fill in another textbox on the form.

I can get the bound column (2) to fill in the "Team" textbox , but I can not get the unbound column (1) to fill in the "Sport" textbox.


sum in form footer
I have this problem and I cant figure it out how many times I have tried it myself.

I have this subform, and it has 4 textbox: three that is bound and the one that is unbound form.

when I do calculations in the bound textbox, I can successfully arrive at the sum of textbox3 but when I sum the fourth unbound textbox, it give an error inside the textbox.

Does it mean I cannot make a summation of an UNBOUND textbox


Clear Error from textbox
I have a continuous form. On that form is an unbound text box which gets its value from another table based on a value in the current record. I use the Dlookup function for this. Now, if there is no matching value in the look-up table, then the textbox shows #Error (which is fine). I was wondering how I could make the textbox display a blank instead of #Error.
The Dlookup code is:
DLookUp("[Attachment]","[tblAttachments]","[ID]= " & [Forms]![frmHalifax]![Attachement_ID])


Using a Form Field as A Query Criteria
I have a criteria in a query that references an unbound textbox in a form. Basically, I want to be able to enter a keyword in the textbox, and the query returns all records that contain that keyword in that field.

Here's the criteria function I'm using and for some reason it's not working:

Alike "*[Forms].[FormName].[TextBoxName]*"

I tried using "!" instead of a period between brackets and that didn't work either.

When I change the criteria the below, the query works perfectly fine, so I'm assuming I'm making an error in the way I'm referencing the unbound textbox?


Edit user name
I have a combo box which displays the users from a table. Based on the value in the combo box, a textbox gets automatically updated. For example, if I am selecting John in the combobox, then the textbox also says John. I am using the textbox to edit userName.

Now the problem is, the Textbox is bound to the UserName field in the table. So when I type "Johnny" in the box, then it immediately gets updated in the table. I want it to get updated only when I click on the update button.

I understand this is happening cos the textbox is bound to a field in the table. I am also aware that I can make the textbox "unbound" and write code on click of the update button to manually update the table (by using a query).

But if I make the textbox as an unbound field, then the value doesn't change based on what I select in the comboBox.


Edit user name
I have a combo box which displays all the users from a table. Based on the value in the combo box, a textbox gets automatically updated. For example, if I am selecting John in the combobox, then the textbox also says John. I am using the textbox to edit userName.

Now the problem is, the Textbox is bound to the UserName field in the table. So when I type "Johnny" in the box, then it immediately gets updated in the table. I want it to get updated only when I click on the update button.

I understand this is happening cos the textbox is bound to a field in the table. I am also aware that I can make the textbox "unbound" and write code on click of the update button to manually update the table (by using a query). But if I make the textbox as an unbound field, then the value doesn't change based on what I select in the comboBox.

So it is possible to make the value in the textbox change based on combobox selection and also update the field only onClick of a button


datediff function on access form. 2003. Returning "#ERROR"
I have an unbound textbox on the form that displays the difference between two dates.

Formula is below, but when I switch to form view, the textbox shows "#ERROR".

Anybody know why that might be the case?

In the Expression Building, this is what I put in the "Control Source"

=DateDiff('h',[cbc_test_done],[start date])

Field names are 100% correct though


How to put the calculated data from a textbox on a form into a field on table?
I have added an unbound textbox namely textbox A on a form. I typed an expression in the Control Source property box, for example [textboxB]*2. Now textboxA shows my desired calculation. I want this calculation to be inserted on table turn over , field my sum. but this does not happen when I click on the save record button that I had already made. How can I solve this problem


Textbox Date just from First to Last
I have an unbound textbox that I can enter the date. I want to make 2 buttons that will go thru the dates day by day forward (Button1) and back (Button2). I want that the last day in the DB (I have a constants that are the first/last day in DB(txtAltEnd=DMax("[DATUM_IZVESTAJA]";"IZVESTAJ") etc.) be the default value when i enter the form. If i could get the Name of the day (Friday etc.) that would be GREAT. How do i do this?


Capture 2nd Value in an unbound Combo.
I have an unbound Combo (textbox) that has the following Rowsource Set

SELECT PartCatPREFIX, PartCatDescription FROM PartCategory;

On the change event, I filter the Form based on the value.

'---This is the Part Filter
If txtFilter = "" Then Exit Sub
sStar = "*"
sFilter = "[PartNo] like " & Chr(34) & sStar & txtFilter & sStar & Chr(34)
Me.Filter = sFilter
Me.FilterOn = True
cmdAddNewPart.Enabled = True
txtFilterView = ? ' Can I call the second value directly

the last line is where I would like to set a textbox txtFilterviewon the form to show the current filter selection to the PartCatDescription field.

I could requery for the value in the textbox, but I was wondering if it is possible to call the second field in the rowsource directly


Populating a field
Say I have a table "product" with fields "serial" and "company" I have a an unbound form, where in one listbox I can choose from all the "serial" values.
Now, after I choose the "serial" from the listbox, I would like to display the value "company" in a textbox (from the currently selected record).


Losing information from a text box
I have a textbox on a form, control source is
"=DLookUp("[qry_ActionEmployee]![Name]","[qry_ActionEmployee]"," qry_ActionEmployee]![Payroll No]= [A_Employee_ID] ")".

When I run some VB code related to the form but not the textbox it returns a value of null? in the textbox.
Before the code is run the value is ok. I have tried using ".Requery" of the textbox in the code but has not worked


Unbound textbox won't print
I have an unbound textbox on a form that pulls a searched number from the previous form. Works perfect except it doesn't print.

This is part of my code from my OnClick button to open the form I am talking about above.

Forms!frmAssetDelete!Text29 = Me.Text10

I need the unbound textbox (text29) to print.

What is the secret?


Conditional Format Textbox
I am a very basic user of Microsoft Access with no formal training. I had to build a database for work originally in Excel, but it took too much time when updating it on a weekly basis. SoI switched to Access and cut my work on this database by two-thirds each week.

I need to have Textbox 71 of my reports highlight in red when the following two conditions are meet:
1. Textbox 67 = "M"
2. Textbox 71 > "13:00"

I have used Conditional Format for Textbox 71 to highlight another condition when the value in the Textbox 71 is greater than "14:30" for all values.

I am guessing I need to write some sort of formula...


Requery without losing focus?
I have a form with an unbound textbox and to this textbox I've added some VBA code that requeries the form on change. This way the user can quickly find what they're after.

There is one little problem with this, the requery on the form makes the textbox lose focus, the focus is placed on the first bound textbox of the form. I tried working around this by calling setFocus on the unbound textbox, but this also selects all text in it! So if you're typing you keep overwriting what you previously typed....


Requery without losing focus?
I have a form with an unbound textbox and to this textbox I've added some VBA code that requeries the form on change. This way the user can quickly find what they're after.

There is one little problem with this, the requery on the form makes the textbox lose focus, the focus is placed on the first bound textbox of the form. I tried working around this by calling setFocus on the unbound textbox, but this also selects all text in it! So if you're typing you keep overwriting what you previously typed.


How to check textbox field length dynamically
I'm new to MS Access forms. I have a combobox with 3 fields A, B, C. and a textbox. When the option B is selected the length of the characters in textbox should not exceed 3. I'm trying to write VBA code for this as below

Private Sub TEXTBOX_KeyPress(KeyAscii As Integer)
If [TEXTBOX].length && [COMBOBOX] = "B" Then
MsgBox "Error"
End Sub

But the "length" field is not available in TEXTBOX, Could any one of you please let me know on how to resolve this


enter line break in textbox
I have a (rich text) textbox on one of my forms. I'd like the user to be able to use the enter key to go to a new line. As I found out the enter key does not normally behave that way in a textbox I am trying to solve this through vba code. I came as far as the following:

Private Sub mail_text_Enter()
mail_text.Value = mail_text.Value & ""
mail_text.SetFocus
End Sub

which is wildly unsuccesfull as it only adds a line break at the end of the text (I don't know how to get the cursor position) and it doesn't even set focus back to the textbox.

I feel I'm going totally the wrong way about this. Does someone know how to do this