Control Source For An Unbound Textbox

Oct 25, 2005

I have a form that uses a query as its control source. The problem I have is that on this form I have an unbound textbox that I need to show the result of another query in. I thought I could do this by using =[Query]![QueryName]![Field name] in its control source, but this isn't working.

What is the right way to go about this?

Cheers

View Replies


ADVERTISEMENT

Textbox Control Source To Field Plus Sum

Jun 16, 2006

I have a textbox with it's field control source set.

Is there any way of having a Sum function that adds up other textboxes and saves them in this field/textbox.

So far i can either set the control source to the field name or have =Sum([size_sqm])

View 2 Replies View Related

Textbox's Control Source Property

Feb 15, 2006

I have a main form with about six text boxs, these are too small to display the complete data so I created a form with a larger text box. When I dbbl-click in any of the various text boxs on the main form it would open the new popup form displaying the data. I need to be able to access the control source property of the popup form's textbox to change the control source to match the selected text box on the main form. This would allow me to use only one popup form instead of six.

The code I use to access the actual popup form itself is:

Forms![Notes].Form.Caption = " Notes "

Now I need to know what the code is to access the forms textbox control source data.

Hope I have explained this correctly

View 3 Replies View Related

Queries :: Union Query - Control Source For Unbound Listbox

Nov 25, 2013

I'm preparing a query as the control source for an unbound listbox. The following code gives the desired results:

Code:
SELECT DISTINCT tblCameras.CameraNum, QrySbfShotList.CamerasFK
FROM QrySbfShotList INNER JOIN tblCameras ON QrySbfShotList.CamerasFK = tblCameras.CamerasID
WHERE (((QrySbfShotList.shootsFK)=[my].[control]))
ORDER BY QrySbfShotList.CamerasFK

(My.control will be a control on the form. For the time being, I let the query prompt me for a value.)

It produces two columns like so:

CameraNum Camera ID
1 2
2 3
3 4
4 5
5 6
6 7
8 9
11 12

CameraNum is text; CameraID is numeric.

Now, I'm trying to use a trick I read about that should add a single textual entry to the top of the list like so:

Code:
SELECT DISTINCT tblCameras.CameraNum, QrySbfShotList.CamerasFK
FROM QrySbfShotList INNER JOIN tblCameras ON QrySbfShotList.CamerasFK = tblCameras.CamerasID
WHERE (((QrySbfShotList.shootsFK)=[my].[control]))
ORDER BY QrySbfShotList.CamerasFK

union

SELECT "(ALL)", "Dummy"
FROM QrySbfShotList INNER JOIN tblCameras ON QrySbfShotList.CamerasFK = tblCameras.CamerasID
WHERE (((QrySbfShotList.shootsFK)=[my].[control]));

This produces

CameraNum Camera ID
ALL Dummy
1 2
11 12
2 3
3 4
4 5
5 6
6 7
8 9

The second (numeric) column is now out of order. This is reproducible for other values of my.control. If there are double digit entries they get inserted at the third row.

Why? What am I not understanding about how UNION works?

(BTW, I know I could put the "ALL" entry into tblCameras, thereby avoiding the need for a union, but I'd still like to know why the unexpected result.)

View 6 Replies View Related

Display Control Source OR Default Value In Textbox

Aug 31, 2005

Table1 has field (% Completed this Period) that may contain a value, or may be NULL for each entry, depending on how much work was performed that period. The records are sorted by date.

Form1 has a textbox that basically keeps a running tally of "% Completed to Date" by summing the "% Completed this Period" for the current period and all previous periods. So, my Control Source for the textbox is the DSum(...) function.

The problem is this: If I am looking at the first record and there is a 0 (null) value for "% Completed this Period," (i.e. No work was completed that period), I want to display 0 on Form1. However, Access just displays nothing - a blank textbox. I tried making a default value, but nothing will show up since I already have a Control Source set for that field. If I take the DSum function out of the Control Source, then the 0 will show up. But, obviously that defeats the whole purpose of the textbox. I guess I'm trying to figure out how to display the DSum value IF it is something other than 0, BUT IF IT IS 0, then I want 0 to be displayed. Any help would be appreciated.

View 1 Replies View Related

Forms :: Textbox Control Source - Pull Data To Display On Summary Tab

Oct 16, 2014

I have a form, with a tab control on it. Each tab has a subform to display data. One tab is meant to be a summary tab of the rest, so I want to pull data from certain controls on each of the other tabs to display on the Summary tab.

If I set the ControlSource to Forms!subfrmLABOUR!txtTotalHours.Value the control just displays #Name?

I assume that means it can't reference the ControlSource. Is it just a syntax thing? I've tried various methods, but no luck.

View 6 Replies View Related

Forms :: Update Unbound Textbox In Main Form From Subform Textbox Afterupdate

Apr 17, 2015

How to update unbound textbox on main form from unbound textbox in subform afterupdate.

that is when amount paid is updated it automatically updates total paid, balance etc.

View 2 Replies View Related

Pass Value From Unbound Textbox To Bound Textbox

Oct 26, 2006

Hi: There are two textboxs in my main form. One is bound and another is unbound. There is no entry in the unbound textbox as values come into automatically after entering some information in the subform. My question is how to i pass values from unbound textbox to bound textbox every time when the value change in unbound textbox i need to change the value in the bound textbox. When the form load there is already value in the bound textbox which i want to override based on the values from the unbound textbox.

Thank You.

View 2 Replies View Related

Remove Record Source/Control Source

Sep 19, 2005

I have an unbound form with three tabs. On each tab there is a sub form. Each tab is a search form and each sub is a results returned. I have made everything unbound and set the sub form recordsource and its controls control souce on afterupdate of the main form search criteria. Works fine except for after some use the db decides the sub forms are not unbound and sets the record source and control sources.

I'm trying to do a

Me.PollingPlacesResults.Form.RecordSource = ""
Me!PollingPlacesResults!PollID.ControlSource = ""


but this does not seem to work in actualy removeing the record source and control source.

View 14 Replies View Related

Forms :: Invalid Control Property - Control Source

Sep 24, 2013

I added a new field to one of my tables and query, but when I try to add a control for that field into my form it is not recognising it and the field isn't appearing in the sources for the form, even though the table is sourced to the form? Or am I going to have to do the usual and redo the entire form because I made a minor adjustment?

View 1 Replies View Related

New Field Does Not Show In Control Source For Form Control

May 28, 2015

I have table that I had to add a new field to which we update with a form. I tried to add a control for the new field but the field does not show up in the list for the control source. I am trying to add a list box to the form with a blank and 5 options.

I have attached screen shots of the table design and the form. The table has the field in datasheet view and I have manually entered a few entries in it but it still will not show in the control source for the form control. The top section of the form is where we enter and select the data for the new records. The bottom section (circled in red) autofills the matching record, from separate tables, for updating with the new entries.

I have added form controls for modified fields in the past so I am confused about why this is happening.

View 2 Replies View Related

Changing The Source Of A Textbox

Jul 14, 2006

A simple question that would probably take me hours to figure out by myself: When I want to change the source of a listbox, fx. when a button is clicked, i use the command 'rowsource ='. But what command do i use to change the source of a textbox...??

Thank you in advance :-)

// JR

View 5 Replies View Related

Unbound Textbox

Mar 17, 2006

I have a form that calls up an employee that also lists their hire date. I have an unbound text box that calculates the years of service by DateDiff(). It works for the first record but sticks for all the subsequent records. I've tried an afterUpdate or Change on the bound Hire_Date text box that is Me.txtYearsOfService = DateDiff("yyyy",Me.Hire_Date,Now) but it still sticks to the first record.

I'm sure this is basic but can't see the obvious. Please relieve the pain.

Thanks

View 3 Replies View Related

Forms :: Clear Source Object On Subform Back To Unbound

Feb 16, 2014

I have a listbox "lbxMP" that holds names of forms and a subform "ctrlMP" that opens selected form (ctrlMP.sourceobject = lbxMP). I also have some various master cbx that control criteria in each form. I am trying to create a button that will not only clear/null all the cbx values (which works fine), but I am having a hard time telling me.ctrlMP to go back to null or unbound (i want it to blank out the subform to make it look fresh). I have tried requry and also me.ctrlMP = null and ctrlMP=unbound with no luck.

View 1 Replies View Related

Simple Qry Using Unbound Textbox.

Jul 12, 2006

Hi all,
I am experiencing problems trying to put together what I thought was a simple form that would
allow users to search for data from a field on one table and display the results in a data grid style from the query I have created. However the query is'nt working and I am sure it is because of the way I have coded the query to read from the form's textbox. The SQL code is below.

SELECT tblFiles.Vault, tblFiles.Wlt, tblFiles.CD, tblFiles.Media, tblFiles.ProjectNo, tblFiles.ProjName, tblFiles.FileName, tblFiles.Location, tblFiles.NetLoc, tblFiles.CreDate
FROM tblFiles
WHERE (((tblFiles.FileName)=[forms]![frmArchive].[txtprjname].[value]));


There is a value in that field as 'attachment' and if I type that in the textbox it will find the records that have exactly that string but if I type 'att' there are no results. I tried searching in help for 'Like' since I believe that is the problem with my code but it did not show me an example of how to code that in the query to refer to the object on the form.

the code I have on the button next to the unbound textbox is as follows...

DoCmd.OpenQuery "qryFindPrjFile", acViewNormal, acReadOnly

Can anyone offer me any advice on how to do this?

Regards,
Mitch...

View 1 Replies View Related

Simple Qry Using Unbound Textbox.

Jul 12, 2006

Hi all,
I am experiencing problems trying to put together what I thought was a simple form that would
allow users to search for data from a field on one table and display the results in a data grid style from the query I have created. However the query is'nt working and I am sure it is because of the way I have coded the query to read from the form's textbox. The SQL code is below.

SELECT tblFiles.Vault, tblFiles.Wlt, tblFiles.CD, tblFiles.Media, tblFiles.ProjectNo, tblFiles.ProjName, tblFiles.FileName, tblFiles.Location, tblFiles.NetLoc, tblFiles.CreDate
FROM tblFiles
WHERE (((tblFiles.FileName)=[forms]![frmArchive].[txtprjname].[value]));


There is a value in that field as 'attachment' and if I type that in the textbox it will find the records that have exactly that string but if I type 'att' there are no results. I tried searching in help for 'Like' since I believe that is the problem with my code but it did not show me an example of how to code that in the query to refer to the object on the form.

the code I have on the button next to the unbound textbox is as follows...

DoCmd.OpenQuery "qryFindPrjFile", acViewNormal, acReadOnly

Can anyone offer me any advice on how to do this?

Regards,
Mitch...

View 1 Replies View Related

Update Unbound TextBox

Jul 19, 2006

Hello,

I'm having a problem with one of my forms, i have created an unbound text box called Hours. In it i will type a number. Then click on a button to create a report based on this number.

what is happening though is that when i click the report button the report is blank, if i close the report and then click the button again i get the expected results. What seems to happening is that after i click the button the first time the form refreshes itself and the number is picked up.

Is there any snippit of code i could add to the print report button so it will work first time?

regards

Pete

View 4 Replies View Related

Change Value Of Unbound TextBox Conditionally

Jan 10, 2006

Can anyone help me out here.
I need to use an unbound text control to return me a value if a field is populated else "Local" if the field is not populated.
Can anyone tell me if this is possible and show me the syntax if it is.
Help appreciated.
Andy

View 8 Replies View Related

Date From Unbound Textbox Problem

Apr 1, 2008

hi there

what i am having difficulty with is :confused:

i have a form with a unbound text box were a date is added by a user and
then a command button is clicked and if the date entered is say 10 days older than the todaysdate date it opens a different form
something like this??

date < me.textdate then
open form

any help will be appreciated :)

thanks
rob
sorry if it seems a bit vague

View 3 Replies View Related

Default Date For Unbound Textbox

Sep 29, 2005

i have an unbound form where users can enter as much or as little as they'd like to search the database. i'd like to have default values for two unbound textboxes for initial date and ending date. i was wanting to put in 1/1/1999 for initial and 1/1/2050 (or another high number) for ending date. however, when i put those values in the Default Value property for each textbox, it changes to 12/30/1899..for both the initial and ending dates...how do i get my dates to show up?

View 2 Replies View Related

Limit The No. Of Characters In An Unbound Textbox?

Sep 1, 2006

Is there a way to limit the number of characters that can be entered into an unbound textbox on my form?

I have a search textbox, where a jobId is entered and button is clicked to search. The numbers are generally 8-digit. I just noticed one of my users trying to enter 9489858939349839434 :eek: ohh lawd. Please help me stop these people before they break my db...

View 13 Replies View Related

Modules & VBA :: Cannot Update Unbound Textbox

Sep 24, 2013

My form has a button that opens another form on which I enter meeting RSVPs. Then that form is exited. I have an unbound text box on the main form that I want to show the total number coming. I have a summation query that totals the number. I have tried everything I can think of to force the text box to requery. I tried putting the dlookup in the textbox itself, then I removed that and tried all of the things below, both in the gotfocus event and the onCurrent event. What else can I do to trigger the recalc?

Private Sub Form_GotFocus()
Me.numcomingtxtbox.Value = DLookup("howmanycoming", "numcoming") & " Coming"
Me.numcomingtxtbox.Requery
Me.Recalc
End Sub

View 8 Replies View Related

Forms :: Getting Value From Unbound Textbox Into Form

Jun 20, 2013

I have a unbound text box in the form header and have a command button in form I am wanting to put the unbound textbox value into a bound textbox on form.

View 1 Replies View Related

General :: Unbound Textbox Storing Value?

Apr 17, 2014

Code:

Private Sub Combo1309_AfterUpdate()
If Me.Combo1309.Value = "Yes" Then
Me.Text1307 = Environ("UserName")
Me.Patient_Gender.BackColor = vbYellow
ElseIf Me.Combo1309.Value = "No" Then
Me.Text1307 = Environ("UserName")
Me.Patient_Gender.BackColor = vbRed
End If
End Sub

I have the above code in an unbound textbox and it functions correctly. Expect, the value Yes/No appears in every record in that textbox,So, if in record 1 the value of that textbox 1309 is Yes in record 2,3,4 the value of that textbox 1309 is set to Yes. How do I make it blank until the user selects the proper choice.

View 1 Replies View Related

Unbound - Populate Textbox In Form

Nov 13, 2012

I'm trying to populate a form textbox which is unbound.

I have table with a list of peoples login names and a query filtering these names once a user logs in. If the GetUserName() matches one of the names in the table then user is authorised. this part seems to be working fine. User not on the GetUserName() list the filter says blank ie Not Authorized.

How to take this confirmed user name and place it into a textbox on a form?

Table name: [tblUserNames] with [IngEmpID] & [UserName]

Query Name: [qryUserNames] with a Criteria GetUserName()

View 7 Replies View Related

Populate Textbox With A Field From Another Combo Box's Row/source Table

Jul 18, 2005

I've designed a data entry form based on a table. I use a few combo boxes, (linked via SQL statements for their row/source) to fill most of the fields in the table.

What I want to do is populate one textbox on the form with the contents of a field in one of the combo box's row/source tables. The field I want isn't shown in the combo box.

Basically, what I want is that when I choose a PART NUMBER from a combo box, I want the OEM_ID from the same table to jump into the textbox below it.

I think I may have tied myself in knots though to the point where what I want can't be done. Any ideas? I know this is probably going to take a couple of goes at explaining. :P

View 11 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved