Update Textbox Problem (Not As Simple As It Sounds)
Feb 6, 2008
Hello,
I am still wet behind the ears in regard to Access so your help and support is much needed.
I have created a form in Access where i am having trouble with a textbox. In short this box is called [Shift] i want it to be populated by the result the system returns in another Textbox which is called [Time], this box is set up as Time().
So below is what i need it to do when the Form is used.
Textbox: [Time] = (07:00 - 14:59) would return "Earlies" in Textbox: [Shift]
Textbox: [Time] = (15:00 - 22:59) would return "Lates" in Textbox: [Shift]
Textbox: [Time] = (23:00 - 06:59) would return "Nights" in Textbox: [Shift]
I have tried the VBA below without success in this task so i can only assume it is due to the fact that the Time field is system generated or the fact it is in time format:
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...
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...
Hi All I cant seem to insert carrage returns into my text boxs. I have a form with multiple large text boxs which stores the contents in a table under the datatype 'memo'. When I am in form view mode, I start writing text into a text box which is fine, but every time I press the return key the focus changes to another control. But I want the CR to be placed within the text box itself, is this possible? Anyone know how to do it?
I have a 'display only' form, which updates a company's sales totals every five minutes. I would like to add a beep or other sound when the screen updates. Is there any way to play a sound or beep from Access or SQL?
how to get a "sound" to occur everytime a certain message box pops up.I wrote the following code which currently allows the MsgBox to open when the criteria is met, BUT it does not make a sound when opening. I followed the instructions as per this link URL....
Private Sub Open_frmAccessories_Click() If (Me!txtProductGroup) = 9 Then MsgBox "This Product Does Not Have Any Accessories", -vbExclamation, "NO Accessories for this Product" Exit Sub Else
[code]....
I have attached a copy of the pop up box to show it is working correctly, albeit without the sound function. Curiously, if I click on any button in the Products main screen behind the Error Msg box, i.e. "New" or "Close" the SOUND occurs at that point!
So i am building a DB for my work and i am having alot of fun with it today and showing my geek/nerd side and putting a few sounds to give it some flair, good idea if the users can mute the sounds. what i have is a module with my sounds and then call fuctions where i want it to play, i have looked around but can't seem to find a way to mute, i was hoping for a button i could put on my login form to mute the sounds.
Option Compare Database '************************************************* **************** 'Declarations section of the module. '************************************************* ****************
Declare Function apisndPlaySound Lib "winmm" Alias "sndPlaySoundA" (ByVal Filename As String, ByVal snd_async As Long) As Long Public Function playwavefile(sWavFile As String) 'Purpose: Plays a sound.
I am a very new Access user. Just getting into it. I have created a database and want to do something that seems simple to me but I can't figure it out.
I have a database containing membership information for a local fishing club.
I want to be able to create a situation where I can do the following.
Enter a membership number and have the members info displayed so that I can then make any changes and update it. I want to be able to do this one member at a time so that I can update as changes come in.
I see a lot of really interesting ways to do this via code as an automated action, but what I can't seem to find is how to do this manually?? I will look into the automation at a later time and probably use some of these wonderful ideas. For the moment, however, I just need to know a simple way to update my front end table after I have redesigned it in the back end. MSAccess help files can't seem to point me in the right direction. I've already changed my back end table, but can seem to make those changes reflect in the front end. I would appreciate any help with this, thanks.
Hello. I'm trying to design a simple database for a bicycle recycling charity. I hit a brick wall when realising that I had never before attempted to update a record. :eek: Until now I've just used Access to add new members to a bus user's organisation.
If the shop takes delivery of 20 tyres, I need to add 20 to the current stock.
Is it possible to achieve a simple Form that adds to or subtracts a quantity from current stock, or do I have to learn some access programming?
I've looked through some textbooks and can't find a simple update solution.
I am trying to update the value in one field (RUS Prop Class Document) of a form based upon what is selected in another field (RUS Prop Class Code). I plan on this being a hidden field so I was creating an after update expression in [RUS Prop Class Code]. My problem is that the value returned is the very nice and working query but not the value of the query. I'm missing something that I think is simple but cannot figure out with my limited resources and late hours.
Here is what I have for the after update expression in [RUS Prop Class Code]:
Private Sub RUS_Prop_Class_Code_AfterUpdate() [RUS Document].Value = "Select [tbl_List of RUS Classifications].[RUS Prop Class Document] " & _ "FROM [tbl_List of RUS Classifications] " & _ "WHERE [tbl_List of RUS Classifications].[RUS Prop Class ID] =" & Me.[RUS Prop Class Code] & ";" End Sub
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?
I need to have 2 textboxe son my form that are directly linked to data in a DB so that the user can type values in directly. Unfortunately, the data for these 2 textboxes is completely separate from the main form's recordsource.
Is it possible to do this using an expression? I've tried but it only retrieves the data rather than allows you to update it. If not, then will I have to do this through VBA code?
Hi... I searched quick, didn't find anythign, but you guys are so responsive... :D
Question: Part 1. On TimeSheet form, I want to click to "create new job", and the Jobs Form opens, at a new record. Currently it opens at record 1.
Part 2. I foresee that when I return from the modal job form, the old form (timesheet) would not have updated the combobox to show the jobname I just entered.
I guess this is what subforms are, because I keep reading about them, but dunno what they are.
I've done this tons of times, so I don't understand what's happening... The title says it all: when I update the ID of one record of the main table, the referenced records on related tables won't update even though they have a relationship between them with the option "Cascade update" clicked.
In the attached database, the main table "Expedientes" is related to table "Actuaciones".
I have a textbox on my main form that calculates the total of a field on the sub-form. It works well and display the correct ammount on the textbox when I load up the form, but if I do changes the values of the sub-form it doesn't update at all ! I need to close and open the form again to see the changes.
How can I update the textbox so it always reflect the values on the sub-form?
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
I have a form which displays data from a combo box in the header of my form.
Each row of the detail from the form contains two values from the database.. one is called case ref and the other is a checkbox for completed.
Here is what I want to do....
1) chose which rows I want to update by selecting the checkbox (I can do this) 2) I have put another text box in the header with a button.. this box captures the case ref (I have done this bit too) 3) When the button is clicked, I want to loop through all the records displayed on the form and update those with the checkbox ticked to the value of the text box header.... now I can update one row, but how do I update all of them????
Right. I have a textbox say called TextA which is bound to COl A of my table THis table is being shown as continous forms (ie a set of ros in the detail section) and for each row I want to use a VB function to calculate another value from TextA and update the Value attribute of TextB. I can't for the life of me figure out which event I can use to trigger this function so that EVERY row of the detail section has this function applied to it. I do NOT want to ahve to mouseover or click on etc any fields, I want it all to be calculated when the form has done loading. So far the best I can come up with is OnCurrent, which is no damn use at all - it does the first record and then once loaded the record which has focus. Please please help - I've got a long night ahead of me and this is due to be finished am tomorrow - argh! Cheers!!
I have a date field named "date1" and one undound textbox named "txt1".I need each time when i change the value (dates) on "date1" field the txtbox "txt1" to take automatically the end of the current month date.
Ex.
Date1 value is 22/09/14 the txt1 should be 31/09/14
As the unbound parent list box record selection is changed, I want the sub form to refresh. Do I put code in the Subform Current Record event?
Master Form Name: frmsr_NewWellEntry Unbound Listbox - when record selected the primary key populates txtNavWellID (unbound) on parent form
subform Container fsubsrNavSHLBHL Link Master Fields =Forms![frmsr_NewWellEntry].[txtNavWellID]
The read-only form in the subform Record Source is something like: select * from vsrNavigatorSHLBHL where Well_ID =90243..Key The Form used as the subform above will be re-used in multiple parent forms. The parent form data is form SQL Server, the subform from Oracle.
- textbox - command button - subform (showing a table with 4 fields, including an "EntryID" field but just one record)
What I'm trying to accomplish is to enter a value in the textbox (this value will be one of the EntryIDs in the EntryID field), click the command button, and the subform should refresh itself, showing the record from the table (the 4 fields) which has the same EntryID.
I have a form called CostingForm. This form has a subform called CostingSubform. The subform's data source is a table called Costing Table. The main form has a combobox that has all the "Field names" or headers from the Costing Table that populates with the on open event. I also have a non bound textbox on the main form. What I would like to be able to do is input a value in the textbox, select a field name from the combobox and with an "update" button update the corresponding fields on the subform with the value in the textbox. Is this even possible?