Save Value From Unbound TextBox

Hi I have a unbound textbox on main form which is updated from totals from the subform.

Since I need to save the values of the unbound text box I setup another bound text box on the same form and I need to transfer values from the unbound text to bound text automatically.

But to my suprise the afterupdate event of the unbound text does not transfer any values while the click event does.

I have also attached a small sample of my database. Any help will be much appreiciated.

Thanks

View Replies


ADVERTISEMENT

Save Value From Unbound TextBox

Hi I have a unbound textbox on main form which is updated from totals from the subform.

Since I need to save the values of the unbound text box I setup another bound text box on the same form and I need to transfer values from the unbound text to bound text automatically.

But to my suprise the afterupdate event of the unbound text does not transfer any values while the click event does.

I have also attached a small sample of my database. Any help will be much appreiciated.

Thanks

View Replies View Related

Pass Value From Unbound Textbox To Bound Textbox

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 Replies View Related

Unbound Textbox

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 Replies View Related

Simple Qry Using Unbound Textbox.

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 Replies View Related

Simple Qry Using Unbound Textbox.

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 Replies View Related

Update Unbound TextBox

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 Replies View Related

Change Value Of Unbound TextBox Conditionally

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 Replies View Related

Date From Unbound Textbox Problem

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 Replies View Related

Default Date For Unbound Textbox

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 Replies View Related

Control Source For An Unbound Textbox

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 View Related

Limit The No. Of Characters In An Unbound Textbox?

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 Replies View Related

Query Display Value From Calculated, Unbound Textbox

Here's the situation.

I have a calculated value in an unbound textbox (avghcppmw). I want to run a query (qinsphistory) in which one of the fields is the value of the textbox (avghcppmw).

Is there any way to pull the value from the form and display it in the query. I'm assuming not.

I also assume the only way to do this would be to create a query that would calculate the textbox value and base (qinsphistory) on the newly made query.

Is this correct?

View Replies View Related

Sum Unbound Textbox With WHERE Clause - Version: 2002 (10.0) XP

I have a form with an Unbound text box called NonTaxPrice where I want to SUM records WHERE the Taxable column = -1. Right now I have an Unbound text box named ExtendedPrice that SUMS ALL records to give me a total price. It works as expected but my problem is I need to display a separate amount for taxable and Non-taxable records. I added the Taxable column to identify Non-taxable records, but I canít figure out how to setup a WHERE clause for another Unbound text box so I can display the Non-taxable amount.
Thanks BIG in advance!!

View Replies View Related

Input Mask /format For Unbound Textbox - Currency

How do I apply this - can't seem to get it right - just want to control user into putting whatever and two deciimals for pence.

99.99 input mask is halfway there - except I don't want to limit the pounds amount. putting 99999.99 makes entering 12.31 etc a little awkward.

Cheers

View Replies View Related

Updating Unbound Textbox On Form Per Record Viewed

Hey, I am trying to figure out how to update an unbound textbox on a form to reflect conditional data in other boxes when each record is viewed (pages works with reports but I cant find something similar with forms). such as if I had an unbound textbox that I want to = firstname+" "+lastname I would want for it to update it every time a user goes to the next record.. I can't seem to figure out a command or method that executes every time someone goes to the next record.. (and Im not too familiar with all the commands that come without a GUI).. thanks for your time

View Replies View Related

Populate Unbound Textbox On Form With Results From Query

I have a bound form (frmSpreadsheet) which has three textboxes that around bound to frmSpreadsheet (ctlPeriod, ctlSlot, ctlTagCode) and two textboxes which are not bound to anything (ctlRawDetHD1 and ctlRawDetHD2). I need to populate ctlRawDetHD1 with the results from a query (qryCountofRawDetect) where the value of ctlTagCode equals qryCountofRawDetect.TagCode. ctlRawDetHD1 may be null if the TagCode was never detected on HD1 so I would like a zero to be displayed if that is true, else display the value of qryCountofRawDetect.HDCount.

Please advise on the best way to do this.

View Replies View Related

Subreport Unbound Textbox Won't Print - Version: 2007 (12.0)

I am a newbie access programmer and have run across a perplexing problem. A google search identified some with similar problems but no real answers.

I have a report with a sub report. There are some unbound textboxes on the subreport that are populated by some pre- processing upon loading the form. Basically all works fine for the Report mode and the Print Preview mode. They are growing as they should, etc. The only problem is that they don't print! They're there on preview but won't print, export, etc. I've thought about using a label and setting a caption but that won't work because I can't grow the labels.

Like I said I've seen some others with the same problem but yet no solutions. If I move it off the sub-report onto the main report it works fine, but this would have negative affects on the design of the report. I'm going to have a number of these unbound controls when I'm done with the report so this is more than just a little problem for me.

Any help anyone can give would be greatly appreciated!

View Replies View Related

Strip Decimals From An Unbound Textbox... - Version: 2003 (11.0)

Hi there,

I have a calculation in VB which calculates a the recordset in a query and displays it in an unbound Control.
This is the code:

If Not IsNull(Me.txtMin) And Not IsNull(Me.txtMax) Then
Me.txtPerc = (DCount("*", "qryPercentage") / Me.txtTotal) * 100 & "%"

I'm trying to strip the fraction part from the Control as I'm getting answers like 31.43739374783% and so on.

does anyone know how I'd go about this? I've tried changing the decimal places within the Properties of the control to '0'. that doesn't work and I heard that the Format function might work as well as the Int function.
just not really sure how to apply that.

Any help will be appreciated.

Thanks

View Replies View Related

Addition Of Values In Two Unbound Textboxes And Assigning To A Bound Textbox

hello guys

i have values in two unbound textboxes and now i would like to assign the sum to a bound textbox. Also need AfterUpdate event too.

Can any expert help?

Thank you

View Replies View Related

Populate Unbound Textbox W/calculation Of Data Not In Record Sou - Version: 2002 (10.0) XP

Any help would be greatly appreciated! Thanks in advance!

I have a continuous form with one table as the record source. For each record I need to display the result of an IIF function that displays either "yes" or "no" in a textbox called txtPmtRecd. The record source for my form is on the many side of a one-to-many relationship.

Is this enough info? Please help!

View Replies View Related

Error 13 Type Mismatch. Unbound Textbox To Table Field - Version: 2000 (9.0)

Hi all,

I have a form with some unbound textbox's and a command button. By using the onclick event for the button, i want the data in the textbox's to be entered into a table as a new record. I have been searching and experimenting for hours now with no joy, please help.

As it stands my vba code is...
------------------------
Private Sub cmdSubmit_Click()

Dim rst As Recordset

Set rst = CurrentDb.OpenRecordset("Bookings")

rst!CustomerID = Me.txtCustomerID
rst!EventID = Me.txtEventID
rst!NumberOfReservations = Me.txtNumberOfReservations

rst.Update
rst.Close
Set rst = Nothing

End Sub
------------------------

When the command is executed i am given the msg "Run-time error 13 - Type Mismatch"

Any ideas as to what im doing wrong?

View Replies View Related

How To Display Array On An Unbound Form & Then Save To Table - Version: 2003 (11.0)

Good evening to the Forum,

Within VBA I am creating a two dimensional arry that is being loaded by retrieving values in an Excel spreadsheet.

The array has 11 columns and a number of rows that can be quite large.

My dilemma is how to display the array on my unbound form prior to my writing the data to a table. I have no problem displaying the other values that I am retrieivng from Excel but can quite figure out how to display on my form.

The ultimate goal here is to display the values in the array and then when the save button on the form is depressed to save the values to a table.

Can anyone offer any advice as to the direction to take with this?

Will be displaying the values in a tab control section of the form. Does that make any difference?

Thanks

View Replies View Related

Updating A Table From An "unbound" Form Using A Save Button. - Version: 2003 (11.0)

I have a dB that will be used by multiple users at once, so my form (CACO_Commands_unbd) for data entry/viewing has all "unbound fields" I need help with the code for when I click save. I need it to update all the proper columns in the table (CACOCommands) when I click on save.

Here is what I have. If there is an easier way, please tell me.
(The SQL update line is very long)
Thanks.


Private Sub btt_saveCACO_Click()
Dim CACO_CMD_ID As Variant
Dim COMMAND_NAME As Variant
Dim ADDRESS1 As Variant
Dim ADDRESS2 As Variant
Dim CITY As Variant
Dim STATE As Variant
Dim DUTYPHONE2 As Variant
Dim ACTIVITY_PHONE As Variant
Dim DUTY_PHONE As Variant
Dim ACTIVITY_DSN As Variant
Dim FAX As Variant
Dim ACTIVITY_CO As Variant
Dim CO_WORK As Variant
Dim CO_HOME As Variant
Dim CO_CELL As Variant
Dim CO_PRD As Variant
Dim CO_FAX As Variant
Dim CO_EMAIL As Variant
Dim ACTIVITY_XO As Variant
Dim XO_WORK As Variant
Dim XO_HOME As Variant
Dim XO_CELL As Variant
Dim XO_PRD As Variant
Dim XO_FAX As Variant
Dim XO_EMAIL As Variant
Dim CHAPLAIN As Variant
Dim ACTIVITY_PLAD As Variant
Dim COUNTIES As Variant
Dim NOTE_1 As Variant
Dim NOTE_3 As Variant
Dim CONOTES As Variant
Dim XONOTES As Variant

If Forms!CACO_Commands_unbd!txtCACO_CMD_ID.Value = "" Then
DoCmd.SetWarnings False
DoCmd.RunSQL "INSERT INTO CACOCommands (COMMAND_NAME) Select '';"
DoCmd.SetWarnings True
Set rs = CurrentDb.OpenRecordset("Select CACO_CMD_ID from CACOCommandsunbd Where CACO_CMD_ID = (Select max(CACO_CMD_id) from CACOCommands);")
Forms!CACO_Commands_unbd!txtCACO_CMD_ID.Value = rs("CACO_CMD_Id").Value
End If

COMMAND_NAME = Forms!CACO_Commands_unbd!txtCMD_NAME.Value & ""
ADDRESS1 = Forms!CACO_Commands_unbd!txtaddress1.Value & ""
ADDRESS2 = Forms!CACO_Commands_unbd!txtaddress2.Value & ""
CITY = Forms!CACO_Commands_unbd!txtcity.Value & ""
STATE = Forms!CACO_Commands_unbd!txtstate.Value & ""
DUTYPHONE2 = Forms!CACO_Commands_unbd!txtDUTYPHONE2.Value & ""
ACTIVITY_PHONE = Forms!CACO_Commands_unbd!txt_actphone.Value & ""
DUTY_PHONE = Forms!CACO_Commands_unbd!txtDUTYPHONE.Value & ""
ACTIVITY_DSN = Forms!CACO_Commands_unbd!txtDSN.Value & ""
FAX = Forms!CACO_Commands_unbd!txtfax.Value & ""
ACTIVITY_CO = Forms!CACO_Commands_unbd!txtCO_name.Value & ""
CO_WORK = Forms!CACO_Commands_unbd!txtCO_work.Value & ""
CO_HOME = Forms!CACO_Commands_unbd!txtCO_HOME.Value & ""
CO_CELL = Forms!CACO_Commands_unbd!txtCO_CELL.Value & ""
CO_PRD = Forms!CACO_Commands_unbd!txtCO_PRD.Value & ""
CO_FAX = Forms!CACO_Commands_unbd!txtCO_FAX.Value & ""
CO_EMAIL = Forms!CACO_Commands_unbd!txtCO_EMAIL.Value & ""
ACTIVITY_XO = Forms!CACO_Commands_unbd!txtXO_name.Value & ""
XO_WORK = Forms!CACO_Commands_unbd!txtXO_WORK.Value & ""
XO_HOME = Forms!CACO_Commands_unbd!txtXO_HOME.Value & ""
XO_CELL = Forms!CACO_Commands_unbd!txtXO_CELL.Value & ""
XO_PRD = Forms!CACO_Commands_unbd!txtXO_prd.Value & ""
XO_FAX = Forms!CACO_Commands_unbd!txtXO_FAX.Value & ""
XO_EMAIL = Forms!CACO_Commands_unbd!txtXO_email.Value & ""
CHAPLAIN = Forms!CACO_Commands_unbd!txt_chaplain.Value & ""
ACTIVITY_PLAD = Forms!CACO_Commands_unbd!txt_plad.Value & ""
COUNTIES = Forms!CACO_Commands_unbd!txt_COUNTIES.Value & ""
NOTE_1 = Forms!CACO_Commands_unbd!txtNOTE1.Value & ""
NOTE_3 = Forms!CACO_Commands_unbd!txtNOTE3.Value & ""
CONOTES = Forms!CACO_Commands_unbd!txtCO_NOTES.Value & ""
XONOTES = Forms!CACO_Commands_unbd!txtxo_notes.Value & ""

DoCmd.SetWarnings False
DoCmd.RunSQL "Update CACOCommands SET COMMAND_NAME = '" + COMMAND_NAME + "',ADDRESS1 = " + ADDRESS1 + ",ADDRESS2 = " + ADDRESS2 + ", CITY = '" + CITY + "', STATE = " + STATE + ", DUTYPHONE2 = " + DUTYPHONE2 + ", ACTIVITY_PHONE = '" + ACTIVITY_PHONE + "', DUTY_PHONE = '" + DUTY_PHONE + "', Activity_DSN = '" + ACTIVITY_DSN + "', FAX = '" + FAX + "', Activity_CO = '" + ACTIVITY_CO + "', CO_WORK = '" + CO_WORK + "', CO_HOME = '" + CO_HOME + "', CO_CELL = '" + CO_CELL + "', CO_PRD = '" + CO_PRD + "', CO_FAX = '" + CO_FAX + "', CO_EMAIL = '" + CO_EMAIL + "', ACTIVITY_XO = '" + ACTIVITY_XO + "', XO_WORK = '" + XO_WORK + "', XO_HOME = '" + XO_HOME + "', XO_CELL = '" + XO_CELL + "', XO_PRD = '" + XO_PRD + "', XO_FAX = '" + XO_FAX + "', XO_EMAIL = '" + XO_EMAIL + "', CHAPLAIN = '" + CHAPLAIN + "'," & _
" activity_plad = '" + ACTIVITY_PLAD + "', Counties = '" + COUNTIES + "', NOTE_1 = '" + NOTE_1 + "', NOTE_3 = '" + NOTE_3 + "', CO_NOTES = '" + CO_NOTES + "', XO_NOTES = '" + XO_NOTES + "' WHERE CACO_CMD_ID like " + CACO_CMD_ID + ";"
DoCmd.SetWarnings True
Forms!CACO_Commands_unbd.Refresh
MsgBox "Record Saved"

End Sub

View Replies View Related

Send Value Of Access Textbox To Excel Textbox Using VBA - Version: 2002 (10.0) XP

Hi, this is my first post on any kind of forum so bare with me. What I have is an Access form where the user enters in some values. Queries and reports are run and printed but there are Word docs and Excel files referenced that also require printing. I have got them printing but what I need is for the values that were entered in the access form to be sent across to the excel files that have similar textboxes (or labels, can be any control that shows a value or caption).

Code:
'Test for Excel running and initiate if not
ExcelRunning = IsExcelRunning()
If ExcelRunning Then
Set xlApp = GetObject(, "Excel.Application")
Else
Set xlApp = CreateObject("Excel.Application")
End If
xlApp.Visible = True

XlsFileName = "d:my documentsMaintenance OptimisationText.xls"
XlsCopies = 1

Set xlWbk = xlApp.workbooks.Open(XlsFileName)
xlWbk.Sheets(1).Select

'The following line I have got not idea about, this is where I want to put the access textbox value in
'the excel textbox value -
xlWbk.Worksheets("Sheet1").Shapes(1).ControlFormat.Value = Text1.Value

'Print the sheet
xlApp.ActiveWindow.SelectedSheets.PrintOut Copies:=XlsCopies, Collate:=True


xlWbk.Saved = True
xlWbk.Close

Set xlWbk = Nothing

If Not ExcelRunning Then
xlApp.Quit
End If

Set xlApp = Nothing


Any help on this issue would be greatly appreciated.

Rowan.

View Replies View Related

Hiding A Textbox's Label On No Data In The Textbox - Version: 2003 (11.0)

I know that I can hide a textbox that contains no data by simply setting its CanShrink property to yes. However, that still leaves the label for that textbox showing up in the report. How can I get that to shrink as well?

View Replies View Related

Copy Text From Textbox To Another Textbox - Version: 2002 (10.0) XP

Hello All,
So here goes, i am trying to use a command button or a checkbox to update an unbound textbox containing info i will enter to be copied/transferrd/moved to another text box thats bound to a table. I tried it with the checkbox, i get errors. tried it with the command button, it works, but only with numbers, not words.,help

View Replies View Related

Me.Save Won't Save All Records On DAP - Version: 2003 (11.0)

I've got a button set up to take the place of the save button on the navigation bar... the only problem is, is that it won't save all the records. I've currently got it set up like this:



When I click this, I get an error that "Object doesn't support this property or method", yet I find that it has saved all my changed records except for one.

Has anyone had success with creating a custom save button on a DAP? I see plenty of posts in the Forms forum, but they don't apply to the DAP...

View Replies View Related

Copying From 1 Textbox To Another Textbox On Different Forms

I have a text box on 'Forma' & a textbox (named text3) on 'Formb'.
I want to copy the contents of the textbox from 'Formb' to the textbox on 'Forma'. I have used the following code in the textbox on 'Forma'....

=Forms![Formb]![Text3].text

This doesn't seem to be working whether both Forms are open or only 'Forma'. Could somebody please advise as to what I am missing. Your assistance is very much appreciated.

View Replies View Related

Getting A Textbox To Populate Based On Another Textbox

Dear All:

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?

Thanks,

Dion

View Replies View Related

SAVE Or Not To SAVE - Version: 2002 (10.0) XP

I'm using a form for entry to a table.
On form_close i want the prompt below.

It works but when select not to save it still saves.
Any ideas

THANKS!!

Dim response
response = MsgBox("Save Work", vbYesNo, "Save Changes")
If response = vbNo Then
DoCmd.Close acForm, "frmAddScrap", acSaveNo
DoCmd.OpenForm "frmSelectSubInv", acNormal
ElseIf response = vbYes Then
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.Close acForm, "frmAddScrap"
DoCmd.OpenForm "frmSelectSubInv", acNormal
End If

View Replies View Related

Textbox To Populate Another Textbox

Dear All:

I have created a form with various textboxes. In one unbound textbox called Graduation_date, I input information and this is reflected in another bound textbox called text762.

However, as I scroll through the form, the information that is to be reflected in textbox 762 disappears.

Any ideas on how to apply the information entered in Graduation_date textbox to all?

Regards,

Dion

View Replies View Related

When To Use Unbound

Ive been looking through the posts to see the merits of using bound and unbound forms. I have the following scenario and think that a unbound form would be best solution, what does anyone else think?

I have carried out normalisation of the system and have ended up with two identical tables called Broad themes, one of these tables relates to a documents theme, one to a organisations theme. Organisations and documents are both directly related in the table structure making it impossible to just use one Broad themes table (Circular).

I want to give the user an option form to enter the relevant criteria into unbound text boxes then select using an option group which table to enter information into or option to insert into both tables.

Is this where a unbound form would be most appropriate?

View Replies View Related







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