Combo Box Event Problem

Jun 29, 2006

I have a combo box on a form and when an item is selected other controls are populated from various tables. I'm currently using the OnChange event, but have tried others. It works great if you select an item, but is you type text in it does not work properly. I've tried lots of things but with every scenario am able to break it by typing certain text.

Is there any way to put a drop down list on the form (that is NOT a combo box)? Another option I found under "More Controls" is a "Microsoft Forms 2.0" combo box which you can set to be a DDL, but other features of it do not seem to work properly on the form. I'm not able to populate it with data. Documentation on MSDN is extremely light. Is there a way to populate this with a list?

Is there any event for the standard combo box that only fires if you select an item from the list - not if you type in text?

Appreciate any help....

View Replies


ADVERTISEMENT

Combo Box Event

Aug 19, 2004

I have the following code in the on change event of a combo box:

Surname.Dropdown

*Surname is the name of the combo box...
Is there any code i can put somewhere so that the list part of the combo box disappears when an item is clicked?

thanks

View 4 Replies View Related

Combo Box Event To Select The Item?

Aug 12, 2005

Which event to allow to select the item from the Combo Box?
I try "click" and "change" events, but it do nothing?

Please help.

View 1 Replies View Related

Combo Box Event Based On Selection

Oct 18, 2011

I know how to assign an event to a combo box, but I want to be able to launch a specific link, app, or email template, based on the actual selection from the combo box. So when I make a selection, whatever program or event I assign, to that specific selection, will launch.

View 14 Replies View Related

Forms :: Requerying Combo Box After NotInList Event

Sep 10, 2014

I have a form with a subform that contains a combobox where I choose companies to add to a project that is on the main form. If the user types in a company name that is not in the database, I run code on the NotInList event that passes the company name using openargs to a company entry form.

After this form is closed, I return to the subform to choose the company name that I just added, only it is not there because I can't figure out where to automatically requery this combobox. My duct tape solution that's working, is a command button that runs this code when clicked:

Code:

Forms!frmProjects_Detail_CSS!ASP_Project.Form!cbocompany.Requery

I have tried putting this code in the OnCurrent, OnFocus, Onclick, OnEnter....etc on the subform and on the combobox itself. So far the only way it requeries is if I use the command button.if you want to see the NotInList code, and the code on my company entry form.

View 5 Replies View Related

OnOpen Form Event Filter A Combo Box In Subform

Jan 18, 2006

On clicking a button to open a form I want to filter a list in a combo Box located on the forms subform

The main form is called 'Frm_orders'
The sub form is called 'sub'
The combo box field is called 'CostCodeID'
and I want to filter column 0 of the combobox which is Tbl_InvoiceCostCodes.Type to show records with a type of 'Repairs'

View 2 Replies View Related

Modules & VBA :: Beforeupdate Event Undo Change To A Combo Box?

Oct 7, 2013

I'm working on a bit of code that before a combobox is changed checks with the user to confirm that they want the change to go ahead, if yes a recorded is added to a table

This all work fine apart from if no is selected - I am trying to get the combobox to undo the change however when you select no the msgbox pops up fine but the combobox does not undo

Can't see where I'm going wrong I thought undo worked for comboboxes

Code:
' Displays a message box with the yes and no options.
Response = MsgBox(prompt:="Do you wish to change the status of this Job? 'Yes' or 'No'.", Buttons:=vbYesNo)
' If Yes button selected
If Response = vbYes Then

[Code] .....

View 3 Replies View Related

Forms :: Refresh A Combo Box On Close Event Of Edit Form

Apr 21, 2015

I have a Main form with a combo box that pulls names from a table. Alongside the combo box is a command button that opens a form which allows the user to edit the names in the table.

The problem: When a user edits a name and closes the edit form, the edit is not immediately displayed in the combo box. However, when the Main form is closed and reopened, the edit is properly displayed. Can I somehow refresh the combo box in the On Close event of the edit form?

View 3 Replies View Related

General :: Populate Unbound Textbox With Combo Box After Update Event

Nov 13, 2012

I am populating a table using combo boxes in a continuous form. The box box alone works fine without any issue of repeated data. But as you know obviously the combo box only populates data in a single column of the table, in which case mine is the LASTNAME; so now I am attempting to populate a unbound textbox with the FIRSTNAME side-by-side with the combo box for the same record.

In the After Update event of the cboLASTNAME:

Code:
Me.txtFIRSTNAME = Me.cboLASTNAME.Column(3)

However, after updating the the combo the textbox data is repeated.

Is there a possible solution to this?

View 2 Replies View Related

General :: Populate List Box With Event After Update In Combo Box - Run Time Error 13

Sep 9, 2013

I am trying to populate a list box with an event after update in a combo box. I can get the formula to work using 2 criteria, the problem is i nee to add a third criteria. When I try to add it I get the run-time 13 error.

Here is the code I am trying to use:

Private Sub cboStatusRFQ_AfterUpdate()
Me.cboSupplier.RowSource = "SELECT DISTINCT [Consolidated_Master_Req_Pool.RFQ Contact] " & _
"FROM Consolidated_Master_Req_Pool " & _
"WHERE consolidated_master_req_pool.Complete = FALSE AND [Consolidated_Master_Req_Pool.RFQ Supplier] = '" & Nz(cboStatusRFQ.Value) & "'" And "[cosolidated_master_req_pool.Status] = '" & "[SUPPLIER_RFQ FOLLOW-UP]" & "'" & _
"ORDER BY [Consolidated_Master_Req_Pool.RFQ Contact];"
Me.cboSupplier = Null
End Sub

View 2 Replies View Related

"NOT IN LIST" Event Not Working On Combo Box

Feb 22, 2005

I have a data entry form which allows users to add data to table A. On the form is a combo box populated from table B, that creates a list of values the user can pick from during data entry. If the user doesn't find the desired value in the combo box, then the value needs to be added to table B before it can be added to table A. On the combo box, box I have the event "NOT IN LIST" set to launch a macro to open a form that will allow an item to be added to table B. But its not working. In fact, nothing happens at all.

To get around this, I added a button to my form that allows the users to open a form which will allow the new value to be added to table B. But this isn't working correctly either since the combo box on the data entry form for table A doesn't show the new value.

Help would be appreciated.

View 1 Replies View Related

A New Event

Oct 28, 2007

Hi


I would like to make an event that occurs when the value in the textbox (unbound) is changed.
Can you please show me how to do it?


Thanks

View 1 Replies View Related

Which Event?

Apr 4, 2005

I have a form that has (among other things):

1) a delete button (to delete a record)
2) a Search Payee box (that lists all payee names)
3) an SSN text box

I have code in the "On Enter" event of the SSN text box that pops up a message box asking which way to format the SSN (regular or as tax id). This works fine when entering a new record.

I just discovered, however, that when I delete a record then this message box comes up as well and I don't want it to. Instead I want to use the code "srchPayee.SetFocus" after a record is deleted to move the cursor/focus to the Search Payee box so that the SSN message box does not invoke.

I've tried putting the "srchPayee.SetFocus" in events on the form and also on the delete button, but no matter what I do the SSN message box still pops up after the record is deleted. Which event can I put this code in so that after deleting the record the focus moves to the Search Payee box and the SSN message does not appear?

Thanks!
Laurie

View 9 Replies View Related

Which Event Should I Use?

May 20, 2005

Form1 has a sub form, Form2, which have a tab control with a number of tabs. One of them, Tab4, includes a sub form, Form3.

I have an SQL statement that I want to run (using DoCmd.RunSQL) when Form3 is shown on screen the first time, e.g. when Tab4 activates. I've tried OnClick for Tab4, OnActivate for both Form3 and Tab4 along with a dozen other events with no result. Maybe the problem is that the tab control is also in a subform?

Any suggestions?

View 2 Replies View Related

Which Event?

Jun 3, 2005

I have a combo box with 'yes' and 'no' as options. The default is 'no'. When a user changes it to 'yes', I need to make several text boxes visible on the form. Q. Would it be better to user the OnChange or AfterUpdate event and why?

View 2 Replies View Related

Help With Event Procedure

Apr 11, 2006

Can someone help? I am working on an event database (based on Microsoft 2003 event database template). At present when I register attendees, I can preview an invoice which is generated based on the information I have entered.

I have set up another option to preview a Letter of Confirmation based on this same principal. As I am "Visually Basic" challenged, I simply 'copied & pasted' the event procedure and made the changes as needed to ensure the correct report was opened (ie not the Invoice report but Confirmation Letter report).

However, when I click the button to open preview the letter, the "Print Invoice" box also opens up (as it does when previewing the invoice). I don't want this box to open as I don't need to enter any details.

Can someone please have a look at my VBA event below to see what I would need to delete to stop the "Print Invoice" box from popping up.

Private Sub LOC_Click()
On Error GoTo Err_ConfirmationLetter_Click
If Me![Attendees Subform].Form.RecordsetClone.RecordCount = 0 Then
MsgBox "Enter attendee and registration information before previewing the Confirmation Letter."
Else
DoCmd.OpenReport "ConfirmationLetter", acPreview, , "[RegistrationID]=" & Forms![Attendees]![Attendees Subform].Form![RegistrationID]
End If

Exit_ConfirmationLetter_Click:
Exit Sub

Err_ConfirmationLetter_Click:
If Err <> 2501 Then
MsgBox Err.Description
End If
Resume Exit_ConfirmationLetter_Click
End Sub


Many thanks for any help.
Kath Price
Auckland, New Zealand

PS - Below is the original 'Preview Invoice' event that I copied:
Private Sub PreviewInvoice_Click()
On Error GoTo Err_PreviewInvoice_Click
If Me![Attendees Subform].Form.RecordsetClone.RecordCount = 0 Then
MsgBox "Enter attendee and registration information before previewing the invoice."
Else
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.OpenReport "Invoice", acPreview, , "[RegistrationID]=" & Forms![Attendees]![Attendees Subform].Form![RegistrationID]
End If

Exit_PreviewInvoice_Click:
Exit Sub

Err_PreviewInvoice_Click:
If Err <> 2501 Then
MsgBox Err.Description
End If
Resume Exit_PreviewInvoice_Click
End Sub

View 2 Replies View Related

Need Help To Detect Event

Aug 19, 2005

Hello,
In an empty field how to detect that the RETURN key has been pressed, i don't know hot to differentiate the RETURN KEY and the field exit by clicking the mouse in an other field because in the 2 cases the value of field is set to "", is there a way to test VbKey in a field ?

This because i want to set my field to a default value only when i press RETURN and i don't want the LostFocus or Exit set my field to this default value if nothing has been typed in my field.
(I must precise that for some reasons in my form the KeyPreview is set to TRUE.)

Thanks in advance for help.
VINCENT.

View 2 Replies View Related

Where To Put My Event Procedure

Oct 18, 2005

In my database I track a program called Bridge. Once you open bridge you can have anywhere from 1 to 7 "Sessions". Each bridge is assigned a number IE LT175A. If there are mulitple sessions they are numbered LT175A, LT175B, LT175C etc. I have a check box in my database that shows if bridge is installed on that PC. If it is then my section for session numbers are visiable, if bridge is not checked then the session numbers section isn't visiable. I currently have my Event Procedure in the After Update section. My code works because if I unclick on bridge my sessions disappears. However when I go to the next record if bridge is checked then my sessions are visiable but on the next record where it isn't checked it still displays the session section. So it isn't adjusting itself from record to record. Does my code need to go someplace else or am I doing something else wrong?
Here is the code I have:(and it's under After Update)

Private Sub Bridge_AfterUpdate()

If Me.Bridge = False Then
Me.BridgeSession_1.Visible = False
Me.BridgeSession_2.Visible = False
Me.BridgeSession_3.Visible = False
Me.BridgeSession_4.Visible = False
Me.BridgeSession_5.Visible = False
Me.BridgeSession_6.Visible = False
Me.BridgeSession_7.Visible = False

ElseIf Me.Bridge = True Then
Me.BridgeSession_1.Visible = True
Me.BridgeSession_2.Visible = True
Me.BridgeSession_3.Visible = True
'Me.BridgeSession_4.Visible = True
'Me.BridgeSession_5.Visible = True
'Me.BridgeSession_6.Visible = True
'Me.BridgeSession_7.Visible = True
End If
End Sub

Thanks,

Rick

View 2 Replies View Related

Car Event | Few Errors

Jun 1, 2006

Hi all,

i have been sick for quite a while,But back on track now.In the past i was building a car event db and would like to finish it.I have checked it out and there seems to be a few errors that i can't remember anything about.

you must have outlook installed otherwise some missing references come up.also there seems to be a problem with the date on the invoice form,the backup section in utilites.

If someone could have a look and point me in the right direction it would be greatly appreciated.

The file is access 2003 format

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

On Close Event

Jun 8, 2007

I used the following code in the on close event of my form and it works when the value of [maingameformation.playid] is not previously entered but if there is already a value there it won't overide it? Is this possible to do?


Private Sub Form_Close()
[Forms]![gameentryfrm]![maingameformation.playid] = Me.playid
End Sub

View 4 Replies View Related

Event Procedure

Oct 20, 2006

In one of my forms, i have this event procedure:

Private Sub Gross_Com_LostFocus()
If Gross_Com.Value >= 1000 Then
Full_Com.Value = [Gross_Com] * 0.2
Else
Full_Com.Value = 0
End If
End Sub

Is it possible to put such code in a report and query? If so, how?

Thanks a million!

Cheers!
Sheila

View 2 Replies View Related

Event For Subform

Jan 21, 2005

I have a form with a subform.
I have an event on dbl-click on the subform's detail section, I want to display yet another form - frmDatePopup depending on a value in that subform.
frmDatePopup has an Eval(Forms!frmDates!Start) for criteria for my date field. The problem is that when I dbl-click on the subform's detail section, frmDatePopup comes up blank, as if it ignores the Eval statement.
Any suggestions on what I need to change to make this work?
Thanks.

View 2 Replies View Related

Missing Event

Feb 3, 2005

Hello,

I have just joined this forum so I apologize if this question has already been asked, although I did do a search first. Here is my question:

I'm reading the Microsoft Press book, "Microsoft Access Version 2002, Inside/Out" by Helen Feddema. On page 846, in talking about how to use Form Event Procedures, she shows how to open a form's object property then click on the event tab so that you can enter code for the appriate event procedure. Her event tab of the form properties sheet shows more events than my pc does for Access 2002 (my Access help shows I'm running version 2002). Her event tab starts with "On Current" then "Before Insert", "After Insert" then "Before Update" while mine starts with "Before Update". She shows many more events than what my PC has and I need to use some of the missing ones. Anybody have an idea what's wrong or what I have to do to get the missing events to show up on my PC?

Thanks,
BBinMO

View 2 Replies View Related

Timer Event

May 24, 2005

I'm looking for a code that close my databse when a user is unactive for a set time.

I've search the forums but nothing workked for me

Is there someone who already have a code for this or maybe can help me?

thanks in advance

View 1 Replies View Related

Form Event?

Jun 22, 2005

hi ,
i am new to access ,specially in designing forms .
I have two tables Table1 and Table2 .I have created forms ,Form1 and Form2 respectively.
now what i want is ...when i enter the value in Form2 ...Table1 filed should be updated.
Table1.field1=Table1.field1-Table2.field1
how can i perform this type of action ?

thanks

View 1 Replies View Related







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