Add Data from Unbound Text Boxes to a Table
Thank you for taking the time to report an issue.
What's wrong... Please write below.
I have a form that has no controls source with unbound text boxes that are populated when I place a corresponding code in a text box then hit enter.
Most of the text boxes are just to view data but one of them I want to edit the source field in the table if I press a button. The caveat is I can not have any of the fields bound it all needs to be done via VBA.
After this is done, I will like the record source to be changed to another table so I can add some data to the ones displayed by the search criteria before adding to the new record source.
=sum(iif([CCTVOverdue] = "On Time",1,0))
CCTVOverdue is the name of the unbound text box - can anyone let me know what I am doing wrong here?
What do you want to do: Add a bound text box, Add an unbound text box, Add a calculated text box, Understand text box properties.
My problem is that I cannot seem to get the mouse to focus on the unbound text boxes on this split form. when I click in the unbound filter by form text box, the focus immediately moves to the first text box that is bound to data on the form.
Then I will try recreating my split form in a different way. if it is a problem, If perhaps a split form cannot have any unbound data entry controls on it, then I could create a form with the search criteria on, and keep the forms separate. If I was to do this, though I would like to 'dock' this form at the top of the window, and then have the split form 'dock' underneath, as if there was an application level window splitter control. Another option might be to put the filter by form text boxes in the ribbon, and I have added some stuff here, but I am unsure how I might refer to the control in a query criteria.
The text boxes get their value from two other fields [Quantity] and [Price] the text boxes are of course the total. At the bottom of the form I've been trying to add up all of the text boxes for a grand total.
However if any of the 25 text boxes are empty the total will not add and I'll just get a blank. If all 25 contain data, then everything works fine. I've already checked and all the text boxes are the same data time - Currency.
from the Control Wizard. I have spent a long time creating this form - and have used quite a bit of code to create pop-up calendars, hint text, etc. so starting over is really not an option.
I did not realise that creating an unbound form was going to be such a nightmare!
My problem is - I am obviously unable to create new records or save any input data as the form is not linked/bound to a table. I was told I would need to create headings in a table and link each individual text box, combo box etc.
I know that I can use " " in the design view of the query itself, but when it is reading from my text boxes on my unbound form, how do I do this? I have tried " " in the text box, but itupdates to the literals of " " so this doesn't work.
This works fine where all the fields are text boxes (I.e. not combos or list boxes) but the problem I'm having is that the parent table "tblContracts" has 4 lookup tables (which are used for combos with various fields on the form) and these are numeric fields which link between the tables (I.e. In the parent table the field would be SupplierID whick links to the child table SupplierID field) In the form obviously it displays the actual name rather than the index numerical value when the user clicks the dropdown menu. The issue (I think?) is that the VBA code I have is trying to insert a numerical value (The ID field value) rather than the text which is displayed in the dropdown menu. How can I get round this?
Everything works fine except I do not know how to add or reference a new detail row when a I move to the next record in the recordset, and as a result my form shows me one row for eachrecord repeating whatever data was in the ending record.
So my question is: How do I populate the detail row so that one detail row matches one record from the recordset.
Some background. Each unbound control in the detail section is named "Col" and then a sequential number. So I have Col1, Col2, Col3, etc to Colx (the maximum field the query can return.
I have done the same with the heading being Hed1, Hed2, etc to the maximum. Now I need to be able to reference Row1Col1, Row1Col2, Row1Col3, etc and then Row2Col1, Row2Col2,Row2Col3, etc to the maximum number of records.