I am trying to make a combobox visible when the user clicks on one of a tab control buttons. I wrote this code below, but I does not seem to work. Both the tab control and the combo are on the same form.
Private Sub L_B_Consent_Click()
Me.cmbLBConsent.Visible = True
End Sub
Dont be overwhelmed by the following, but it may require some extensive thought and I dont expect everyone to understand....
I want to have a unbound form control a subform. On the form I have an unbound text area entitled txtDate. In this area it displays the current date being viewed. I have put left and right buttons on the main form that will add (+1) one day to the date being shown and subtract (-1) one day from the date being shown. I want to conrol it though the "On Click" but I dont know what to enter in the "On Click" field that will allow me this. The reason is, co-insiding with the previous, when the date is changed, the subform is also changed to a new day. Therefore instead of displaying 24 hours of today, you can view 24 hours of yesterday, tomorrow and so on. See, if one is to set the onclick to be: Me.txtDate=Me.txtDate-1, or Me.txtDate=Me.txtDate+1, it calls for a custom macro and I dont know why. I know it somehow resides in some similar command set up.
I also need to know how to make the subform bound but continous, and what exactly does that mean?
Hello everyone, hopefully you can help before I go crazy. i have been working on this problem now for 3-4 days.
I have two forms (ID-Injury Choice) and (Treatments). In both forms I have the control (InjuryID). What I am trying to do is when I click a button on the ID-Injury Choice form, the InjuryID control value is automatically transferred to the Treatments form.
For the life of me I can figure out this simple act. Any help would be appreciated.
I have a date control and on the Click event I run the following code. Trouble is the Date Control stops working, ie you can't change the date after one click ?
CODE.
Private Sub Calendar7_Click() weekofyeartxt.Value = DatePart("ww", Calendar7.Value) End Sub
How can I move to control on form when user clicks on another control on same form? In other words... have set validation on controls and unless I disable all the other controls on form until I need it enabled, user can click on other control and get out of the validation sequence. Need to send user back to control they were on when they click on a different control elsewhere...
I am using an active x control that when you right click on it, it automatically pops up an "About" box showing information about the control. I wouldn't object to this, but I need to use the right mouse down event for another purpose in my program. So far I have discovered that the code I put in the the event works, but only after the "About" box pops up. Is there anyway to cancel or prevent the popup? The reason that I need the right mouse down event is because is that I am already using the left mouse double click event, and I can't use the left mouse down event because then it always fires before the left mouse double click event. This control doesn't have any single click events. Ideas?
I have a simple application where a user clicks on the name of the person he wants to update from a drop down box.
The record is then retrieved and the fields are filled on the form. The user will then enter a value in the # in household field. The user is then required to click on the save button to write the record for this person.
I do not have strong users and they invariably forget to save the record and go on to the next person, resulting in the record not being updated.
I coded a message box as part of the save button which displays "person was successfully updated" and then instructed the user to make sure that they see this message before they go on to the next person. They still fail to update correctly.
My question:
Is there a way when the user selects a person from the drop down box and it is loaded on the form, to warn the user that they have NOT updated this person, before they go to the next person?
I don't know what else I can do with these users. They are all volunteers and elderly and the application is for a Food Pantry.
I am trying to allow a calendar to search through a text box with a large amount of data in which will have headings using the date so i wanted to use a calendar search. Hopefully this will be be like the find function in word where you type (or in this case select a date) then click search or next which will take you to that specific date.
Often I use Labels as buttons due to the fact I can colour them the way I want, and use the on click event to trigger code. The code below however works for a command button, but not a label button.
DoCmd.OpenForm "frmdatetime" Do While Forms!frmdatetime!OKFlag.Caption = "False" DoEvents Loop
When this code is run by clicking on a command button, it works fine. If run by clicking on a label, frmdatetime opens, but the mouse will not work on either of the 2 open forms unless you go down to the windows task bar, jump onto another window, and back onto frmdatetime. If I remove the loop with the DoEvents in it, then the problem does not occur.
Can anyone enlighten me as to why this behaviour occurs.
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?
I have a form with a tab control, inside the tab control I placed an ActiveX control (Microsoft Web Browser). These are at the bottom of the form.
Everything displays fine if the entire form fit on the screen but if the form is too long and I scroll down the browser control is getting obscured by the tab control and getting chopped off (the contents are covered). It is as if the browser control is staying in space where it was and moving behind the tab control as I scroll.
This problem does not occur if I place the browser control directly on the form. Also I note that the browser control is sitting correctly within the tab control.
I have been through all the settings and properties of both controls and haven't been able to fix it. I searched all over the web but no one has previously stumbled across this one by the look of it.
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.
OK. I have searched and searched and every thread dances around similar situations but none seem to address this particular one. I am trying to make a control on a sub form visible/not visible depending on the condition of a control on a main form. The catch is that the control I'm trying to change the state of is on a subform located in a tab control. I've tried a thousand combinations and none seem to work. How do I reference the control on the subform in a tab control?
Main Form: frmMemberMain Tab Control: TabCtl12 Tab Control Page: 2 Subform: frmChildren Control on subform: txtRelationship
Can someone please help before my brain explodes!! Thanks! :eek:
I have reviewed the posts for 'Control Validation' and dowloaded the sample database kindly posted by ansentry.
In the PaymentAmount example, a name has to be entered in the first control before an amount is enterered in the second control. If the controls and tab order are reversed, the validation doesn't work.
I have a form where the 1st Control needs validating before moving on. The code below doesn't work.
Private Sub Form_BeforeUpdate(Cancel As Integer) If IsNull(Me.Employee_No) Then MsgBox "Employee No Required", vbCritical, "Data required " Cancel = True Me.Employee_No.SetFocus Exit Sub End If
When I right click on a file in explorer or a drive in my computer my computer either tries to install a program or set up an Activesync connection.How can I stop this?
Is there a way to turn off the right click so I can have it show something else instead of showing the context specific menu. It does show what I want it to, but I don't like have the menu come up with it.
I'm working with a database with employess info in access, When I click on an employees name in a form, I want to fire off another form with there info, what I have now it does nothing.
I created a database in MS Access 2000 for the company I work for. I sent this database from the US to our sister company in the UK, and the gentleman there has no right-click access within the data entry form. Is there something that needs to be turned on or a check box that needs to be checked for right-click access within the program?
Can someone test this for me? I have created a tiny sub that increments a value on the form. Each time the button is clicked the underlying sub runs twice causing the counter to add 2 instead of 1.
Note: I have not used the standard On_Click sub I've made my own. Thanks
Hi, Im currently creating a database for an A-Level project. I am required to create a database for a real company. They have asked me to stop the right click function on forms. I have disabled almost every feature on the forms, however i cannot find a way to disable right click. Please help.
I have a list box control on a form and i'd like to set up a right-click property. Can this be done at all? When I open the Events tab on the property window..there is no right-click property :confused:
I am trying to perform a Function when ever someone clicks_on or tabs to a text box So I set the following on the event Tab
On Got Focus = Calendarfor([txtDOB]) on Click = Calendarfor([txtDOB])
The tab part works great but if the user click on the text box first then it calls the function twice
I know the reason is that if the user clicks the text box first access it saying that Got Focus and Click events are triggered thus it runs the function twice.
How can I prevent the function from executing twice when a user clicks on the text box first??
Hopefully I can explain this right, I have a text box (text7) that is bound to my table. This text box stores a 2 didgit code between 10 and 99 to the main table. I want to be able to use a random function =Int((99-10+1)*Rnd+10) and have the generated number output to text7 only after I initiate the onclick command for the button the function is behind. Does this require a macro to output the number to the bound textbox or is there another way that someone knows of to do this?