Disabled A Click Event

Dec 15, 2005

Hello,

How can you disabled a click event on a text box ? I don't want to use ENABLE = false because the background of the texte box comes gray. So, any alternative solution?

Thanks,

Le

View Replies


ADVERTISEMENT

Modules & VBA :: MouseMove Event On Disabled Controls

Nov 29, 2013

I'm using a mousemove event to display help text for controls in my form.This works well, but I'd like to display help text when the control is disabled as well (to explain to the user why it's disabled).is there any way to fire a mousemove event when hovering over a disabled control?

View 1 Replies View Related

Tables :: Action Or Event Has Been Blocked By Disabled Mode

Mar 18, 2013

When trying to append to a table, I get, "the action or event has been blocked by Disabled Mode!

View 14 Replies View Related

Click Event

Jun 7, 2006

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.

View 4 Replies View Related

Is There A Right-click Event ?

Mar 30, 2006

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:

Thanks!

View 4 Replies View Related

Subform Click Event

Mar 16, 2006

I'm trying to code an event that would occur when a user double-clicks on the Record Selector of a subform. I want it to then open a form that would provide additional details about the record selected in the subform. I can't find documentation to tell me (1) where to put the code, i.e. subform double-click event vs. subform detail double-click event, etc.; (2) how to reference the record id of the selected record for use in the filter for the form that is going to be opened (the underlying query contains the ID for the record). Can anyone help or point me to documentation?

View 2 Replies View Related

Double Click Event

Jan 17, 2005

Hi,

I have a form which has a tab control on it. The form itself is based on 1 table (tblCustomers). The tab control has 2 pages.

Page 1 shows 6 fields from tblCustomers.

Page 2 of the tab control shows 2 embdedded forms. Those forms are based on queries created from tblCustomers. one shows records with a date entered into one of the fields, the other shows records that have no dates.

What I want to be able to do is when I see a company name in one of the ebedded forms (Page 2), I want to be able to double click that record and it switches me back to Page 1 and shows the the related details of whichever company I double clicked.

I have changed the double click event in the emdedded form and using the builder to create something. I also added a setfocus command as I read about that somewhere (but i have no idea what it does). Through this I managed to get it to switch from Page 2 to Page 1 when I double click, but it only ever takes me to record 1 regardless of which company i double clicked.

i may have this deisgned totally wrong so please feel free to point me in the right direction.

any ideas?

thanks in advance

View 1 Replies View Related

Click Event Not Working

Feb 2, 2005

I'm calling a Public Click event on a Form, from a Delete Record button on another form. Debugging shows that the code executes correctly line for line... but the 'Event' doesn't function as it should. The main feature I need to to iterate over the controls on the second form to disable them, to prevent users from typing in, causing relationship error. Why is this?! Even after the execution of the code... I can click on the refresh button myself, which will disable the control, but not if I call the event from the code.

Here is my code...

Code: Private Sub DelGroup_Click()On Error GoTo Err_DelGroup_ClickDoCmd.SetWarnings FalseDim msgString As StringmsgString = "You are about to delete a Lessee/Group." & Chr(13) & "This will also remove all related records in the..." _& Chr(13) & Chr(13) & Chr(45) & " Reviews Tab" & Chr(13) & Chr(45) & " Facility Details Tab" & Chr(13) & Chr(45) _& " Chronology Tab" & Chr(13) & Chr(45) & " Asset and Insurance Tabs." _& Chr(13) & Chr(13) & "Are You Sure?"If MsgBox(msgString, vbInformation + 4, "Confirm Delete") = vbYes Then DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70Dim frm As Form_ReviewsSet frm = Forms!Reviewsfrm.SelectLessee.Requeryfrm.SelectLessee.Value = ""frm.SelectAsset.Requeryfrm.SelectAsset.Value = ""DoCmd.SelectObject acForm, "Reviews", False 'Don't even think i need this line, but put it in for good measure. Tried withoutfrm.Refresh_Click 'It now jumps to the Refresh Click Event and runs as expected...ElseExit SubEnd IfDoCmd.SetWarnings TrueExit_DelGroup_Click:Exit Sub Err_DelGroup_Click:MsgBox Err.DescriptionResume Exit_DelGroup_ClickEnd Sub

This is driving me mad

View 2 Replies View Related

List Box Double Click Event Please Help

Feb 12, 2006

Please see attached database

Main form is frmPatients

If you click on the main form called frmpatient you will see 2
text boxs one called Primary Insurance the other Called Secondary Insurance

Above those text boxes are to hyper links which open the list box


What I'm trying to do is if a user double clicks the name of the Insurance
From the List Box it will insert that Name of the Insurance Into either
The Primary Insurance or Secondary Insurance Text Fields

I do not Want to Use combo Boxes because I have about 1,000 Insurances in my database.


Please Help

View 3 Replies View Related

Forms :: Run 2 Queries On On Click Event

May 1, 2015

I have a form with a combo box that is populated by (1) a union query, and (2) a make table query from that union query. The reason I have both is because I want to have an autonumber and I can't do that directly in the first query.

So any time I update any of the tables that are in the union query, then go back to the form, i want the the combo box to update the list which means I have to run (1) and then (2) to repopulate the combo box with the updates.

View 5 Replies View Related

On-click Event To Refresh Text Box

Feb 7, 2013

I have a textbox which I need to refresh when my Query is refreshed. Currently I only have the ability to requery with a Button but when that button is pushed I also want a text box to be refreshed. This is what I have currently in my On Click property of the requery button:

=[SearchSubformNew].[Requery]

Is it possible to have 2 On Click events? If so I just wanted to add the line to refresh my textbox which is named SummaryText.

View 3 Replies View Related

Cant Work Out Double Click Event For Treeview 6.0

Dec 11, 2007

HI all

I have managed to populate a treeview with some menu items I required and it looks great but I now need to get it to do something. How do I get a tree view value (selection) to act as a variable in routine. e.g. if my tree look like this.

Menu
¦
- Compaint management
I
I----My compaints


When I "double click" on My Complaints I want it to a open a specific form. One I know how to do one action I should be able to figure the rest out for myself.

Thanks everyone. :-)

View 2 Replies View Related

On Exit Event - Tab/click Header Vs. Detail

Jan 6, 2006

I have a continuous form, with data entry fields in both the form header and the detail section.

I've attached an "On Exit" event to the ProdQty field in the detail section. The prime function of the event code is to run an update query on the table (which is the data source for the form).

The code executes properly (update query runs successfully and form refreshes) when I Tab out of that field. It also executes properly when I use the mouse to click on another field in the detail section.

However, when I use the mouse to click on a field in the form header or form footer sections, the On Exit code does not execute properly.

Here's the On Exit Sub:

Private Sub ProdQty_Exit(Cancel As Integer)
On Error GoTo ProdQty_Error

If (Int(Me!ProdQty) <> Me!ProdQty) Or ((Me!ProdQty / Me!LDU) < 1) Or (Int(Me!ProdQty / Me!LDU) <> (Me!ProdQty / Me!LDU)) Then
Me.ProdQty.BackColor = 255
Me.ProdQty.ForeColor = 16777215
Beep
MsgBox "The quantity you entered is invalid for this product." & vbCrLf & vbCrLf & "Please check the LDU (least divisible unit) and enter a new quantity.", vbExclamation, "Quantity Error"
DoCmd.GoToRecord acActiveDataObject, "Order Form", acPrevious
DoCmd.GoToRecord acActiveDataObject, "Order Form", acNext
DoCmd.GoToControl "ProdQty"
Exit Sub
Else
Me.ProdQty.BackColor = 255
Me.ProdQty.BackColor = 16777215
Me.ProdQty.ForeColor = 0
DoCmd.SetWarnings False
DoCmd.OpenQuery "Update Product Qty in Current Order", acViewNormal, acEdit
Me.Requery
Me.Refresh
Me.Repaint

DoCmd.GoToControl "ProductCombo"
End If

ProdQty_Error:
Exit Sub

End Sub

Here's the Update Query:

UPDATE [Current Order] INNER JOIN Products ON [Current Order].[Product #] = Products.[Product #] SET [Current Order].Quantity = Forms![Order Form]!ProdQty, [Current Order].Price = IIf([Forms]![Order Form]![PriceCodeCombo]="CS",[Products]![Contract Net]*([Forms]![Order Form]![ProdQty]/[Forms]![Order Form]![ProdLDU1]),IIf([Forms]![Order Form]![PriceCodeCombo]="EDW",[Products]![Ed Wholesale]*([Forms]![Order Form]![ProdQty]/[Forms]![Order Form]![ProdLDU1]),IIf([Forms]![Order Form]![PriceCodeCombo]="R2",[Products]![R2 Net]*([Forms]![Order Form]![ProdQty]/[Forms]![Order Form]![ProdLDU1]),IIf([Forms]![Order Form]![PriceCodeCombo]="R3",[Products]![R3 Net]*([Forms]![Order Form]![ProdQty]/[Forms]![Order Form]![ProdLDU1]),IIf([Forms]![Order Form]![PriceCodeCombo]="R4",[Products]![R4 Net]*([Forms]![Order Form]![ProdQty]/[Forms]![Order Form]![ProdLDU1]),IIf([Forms]![Order Form]![PriceCodeCombo]="R5",[Products]![R5 Net]*([Forms]![Order Form]![ProdQty]/[Forms]![Order Form]![ProdLDU1]),IIf([Forms]![Order Form]![PriceCodeCombo]="R6",[Products]![R6 Net]*([Forms]![Order Form]![ProdQty]/[Forms]![Order Form]![ProdLDU1]),IIf([Forms]![Order Form]![PriceCodeCombo]="W",[Products]![Wholesale Net]))))))))
WHERE ((([Current Order].[Product #])=[Forms]![Order Form]![Product1]));

I tried copying that code to "After Update", "On Change", and "On Lost Focus" events but the results were the same.

Any suggestions would be greatly appreciated. Thanks!

View 5 Replies View Related

Check To See If A Table Is Already Open On A Click Event

Feb 4, 2005

Some of the things that bring me screeching halt really surprise me. I swear, this sounds like it should be so easy....

What I need to do is check, when the user clicks on a button, whether a specific table that is going to be modified/deleted later in the click code is already open. If it is open, I will msgbox the user to close the table first and exit the sub.

Any ideas?

All help, as always, is much appreciated!

John

View 4 Replies View Related

Added Current Time On Click Event

Mar 5, 2008

I have two fields in my form contained Start time and End time. Currently, Both fields using default Time$() on form. However, End time always wrong because until we get our job done, It took atleast 20 or 30 minutes more than current default time. My question is, is there any way I can setup the End time to just click on it, and a new current default time populated?

Thanks in advance..

View 3 Replies View Related

Forms :: Date Control On Click Event

Sep 19, 2013

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

View 3 Replies View Related

Modules & VBA :: Checking For Key Presses In On Click Event

Jul 25, 2014

I have a button on a form and I want the On Click event behind it to check whether Shift is also being pressed when the user clicks the button (or Ctrl, or Alt, in fact any damn key will do).

I can't believe that there isn't a function in VBA like the old 1980s BASIC 'inkey' function (etc) that just simply returns the code of any key being held down at the time of the scan. I shouldn't have to mess around programming other events like KeyDown and KeyUp when I don't particularly need the key-press to trigger an event per se.

View 7 Replies View Related

Forms :: Event Procedure For Double Click

Mar 24, 2014

I am having a problem in my access database. I have a a form called Compliance Register. When this window opens it lists all of the requirements of a particular department. There is an ID and Source ID(this field can contain the same number such as multiple 17's). The descriptions match up to what is supposed to be shown. However when I double click on the item, it brings up a Compliance Status window. This is where things go wrong.

It shows the status listed as the first Source ID that matches the number, but does not seem to also be matching up the ID as well It must match both ID and Source ID since Source ID can have the same number multiple times down the list..

Here is what is under the Event Procedure for the double click.

Private Sub ListRequirements_DblClick(Cancel As Integer)
On Error GoTo Err_ListRequirements_DblClick
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Compliance Status"

[Code] ......

Under stlink criteria, i need it to not only pull the ID, but it has to have a "AND" Source ID. I need it to pull the record that matches BOTH numbers.

View 9 Replies View Related

Change The Built-in Right-click Event Of An ActiveX Control

Mar 13, 2008

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?

View 2 Replies View Related

Sending Click Event On Subform To Main Form

Oct 24, 2004

This may be a really simple problem but it has me stumped. Working in Access 2002, I have a form with a subform (continuous). When the user clicks on a textbox in the subform, I need to capture the value and pass it to the main form so that it can be used to create a filter for yet another subform (not nested) on the main form. How could I accomplish this? Thank you in advance!

View 3 Replies View Related

Forms :: Button Click Event On Continuous Form

Nov 25, 2013

I have a continuous form with a button 'Cmd1' & a textbox 'txtMail' which is set to visible no.

When the user clicks Cmd1 - then txtMail becomes visible.

I can do it using vba on the buttons click event but when it executes txtMail for all the records become visible.

How do I use a button's click event on the form's current record - Private Sub Form_Current() so that when the user clicks Cmd1 on the current record only txtMail for that record becomes visible.

I'm using Access 2007.

View 10 Replies View Related

Modules & VBA :: Function Returning Max Value - Button Click Event

Dec 8, 2014

I have a table EmployeeInfo containing three fields

EmployeeId
Name
FatherName

I have created form for this table.

I do not want to use autonumber for employeeid for some reasons. I want to place a button along employeeid test box on form.

User will click on the button it will get max employee id from employeeinfo table and add 1 and copy it into employee id text box.

What will be the code for button click event.

View 2 Replies View Related

Forms :: Double Click Event Of Form Header

Nov 17, 2013

I want to add an event on Form Header when double click it will filter the values, which i did with macro, but could it happen on second time double clicking it it refreshes whole as original?

View 2 Replies View Related

Forms :: On Click Event To Print Active Record?

Jul 21, 2014

I have created a form to select multiple records for a transmittal report. I added a button to the form which I would like to open the report to view the current record. In the On Click event I added the following code:

Private Sub cmdPrint_Click()
Dim strWhere As String
If Me.Dirty Then 'Save any edits.
Me.Dirty = False
End If
If Me.NewRecord Then 'Check there is a record to print
MsgBox "Select a record to print"
Else
strWhere = "[TransmittalID] = """ & Me.[TBLTransmittal.TransmittalID] & """"
DoCmd.OpenReport "RPTDwgTransmittal", acViewPreview, , strWhere
End If
End Sub

The debugger keeps highlighting the row above shown in red. I've used this same code before on other forms and it worked but not sure why it isn't working this time. The only difference with this form and previous ones is that this form contains a multiple values combo checkbox (hope that's the correct term). The query that the report is based on changed the names of the field names so that TransmittalID on the form is TBLTransmittal.TransmittalID in the query.

I've tried the code with and without the extended name but each time the "Do.Cmd..." is highlighted.

View 11 Replies View Related

Modules & VBA :: Event Handler For Mouse Right Click And Select?

Aug 11, 2014

I want to handle the event when I right click and choose "Paste" to pop up a message to the user that he cannot paste; disabling the pasting functionality.

I understand that the Button parameter refers to right or left button , but on which event to best use (mouse up ,mouse down , mouse move - as it seems to be a mixture of the three) and the code for that event.

Code:
Private Sub List_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
' See if the right mouse button was clicked
If Button = acRightButton Then
'DoCmd.CancelEvent
'do event here
End If
End Sub

I don't want to cancel after there is a right click , but rather after right clicking and choosing "Paste".

View 9 Replies View Related

Modules & VBA :: Where To Place Code That Run Constantly Without Event Such As A Click

May 26, 2015

I'm currently trying to make the call answering screens a bit better in the call centre that i work in. i'm trying to make a caller i.d. for incoming calls. i have a reference library from the telephone software people in vba that lets me dial and hangup the phone, now i'm trying to place a text box on the form that will update to show the number of an incoming call which will enable me to search a table of contacts and display the details of the caller if they are available. i'm guessing that i need to create a loop that will run until there is an incoming call but i don't know where to place the code without it needing a mouse click or mouse over to trigger it. i just want it to run constantly.

View 5 Replies View Related







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