Adding (All) To A Bound Combo Box

May 24, 2005

Hello,

I have a bound combo box on a form. The selections alow a subform to refresh limiting records to the bound combo box. I have been on the web a lot looking for a way to enable multi list selection or all on a combo box. None of these have worked for me. The selection combo box is a simple Yes or No. I would like to add all and have it return both types of records.

This is the sytax I have in the row source property for my combo box.

SELECT [Sales Master].[Accounting Comp Flag] FROM [Sales Master] UNION Select "All" FROM [Sales Master] GROUP BY [Sales Master].[Accounting Comp Flag];

This code allows the combo box to have an all selection but it does not retrieve any records.

If someone can find my mistake that would be great! Thanks!

View Replies


ADVERTISEMENT

Adding New Fields To Table Bound To A Form

Jan 31, 2005

I have a form which I've spend many hours designing to look and behave as I need it. It is bound to a table (get's it's data from there). I now want to add one or more new fields to the table (which I've done ok), but I can't seem to get the Form to see those fields. I've tried creating new controls on the form and the control source list to select from doesn't include my new fields.
Even if I write VB code embedded in the form to refer to the fields, the debugger trips on the field names saying no such method/object. The only way around it I've discovered is to create a new bound form which will mean re-dooing al the layout work again.

Surely this is a common situation which has an easy solution ?!!

View 4 Replies View Related

Forms :: Adding Text Box In Bound Form That Appends To Another Table

Aug 26, 2014

I have a form AddNewEquipment. This is bound to a table, EquipmentDetails.

EquipmentDetails has a Yes/No field, 'ParentChoice'. So when EquipmentDetails.ParentChoice = Yes, I want to open up a new text box, AddNewEquipment.ParentDescr, into which someone can put some text. This text I want to append as a new row in a different table, ParentList.ParentName. (that table also has an autonumber field)

I only want to do the save when I save the whole form.

Is this something like using an On Lost Focus event from the ParentDescr field which only invokes when the overall form save button is clicked? What would I put in the On Lost Focus event.

View 9 Replies View Related

Text Box Bound To A Combo Box

Jan 24, 2005

Hi,

This one is really confusing me!

I have a text box on a form that is bound to a field in a table that is populated by a combo box coded into the table whose data source is a select query.

Everything looks fine in the table, but when I display the data on the form it is displaying a different field of the source select query than the one displayed on the table.

Why is this, and how can I fix it?

View 1 Replies View Related

Using A Non Bound Column In A Combo Box

Nov 9, 2004

I have a combo box that has two columns, the second one is bound.

Is there any way to reference the 1st column (the unbound one).

What I actually want to do is have the 1st column show up as a status line message or as a quick help message when the combo text is mouse_overed. The problem is the combo box field is a date that is unique 99 % of the time but in that one percent the user needs to see the beginning of the 2nd column ( think of a persons doctors appointments, where one percent of the time a individual needs to visit the same doctor twice in one day , in which case the procedure and the date becomes the selection criteria (but I don't want to show the procedure and the date in the combo box because the procedure is so darn long.)

Confusing enough?

Any ideas?

Thanks

View 1 Replies View Related

Bound Combo Box Query

Oct 13, 2006

If I want to be able to save new data to a field from a combo box, what code do I need.

I found the code below which said it was for an unbound combo box. Not sure what to change. I've set it as my event procedure for "On Not In List" and the query runs ok but nothing else seems to happen. Thats while I have nothing in the control source.

If I amend control source to be the field I want, (which is the same as what I already have in the row source, then it won't let me select anything from the combo box drop down at all.

Not sure what to do? Any ideas please??

Private Sub Combolook_NotInList(NewData As String, _
Response As Integer)
Dim ctl As Control

' Return Control object that points to combo box.
Set ctl = Me!Combolook
' Prompt user to verify they wish to add new value.
If MsgBox("Value is not in list. Add it?", _
vbOKCancel) = vbOK Then
' Set Response argument to indicate that data
' is being added.
Response = acDataErrAdded
' Add string in NewData argument to row source.
ctl.RowSource = ctl.RowSource & ";" & NewData
Else
' If user chooses Cancel, suppress error message
' and undo changes.
Response = acDataErrContinue
ctl.Undo
End If
End Sub

View 2 Replies View Related

Forms :: Combo Box - Bound Option Not Available

Mar 28, 2013

I have tried creating a combo box in a form and as I have gone through the steps, the option to bind each choice that I created in my drop down box for the form is not an option, so how do I make each choice in my drop down box access the report I need?

View 1 Replies View Related

Combo Box And Bound Column Settings

Nov 21, 2013

I'm looking for a work around for getting the bound column setting for a combo box to work. I created a simple table with 2 fields that i have a combo box pointed to. My settings for the combo box are

Column count 2
Bound column 2

The first field is "Description"
The 2nd field is "ID"

I cannot figure out how to have column 2 to be the value that is left in the combo box once I have made my selection.

View 14 Replies View Related

Forms :: Filter Combo Box Value - ID Is Bound Column

Mar 15, 2014

There are 3 column in a combo box, ID is bound column

Part no ID Description
0040 1 class 40-1
0040 2 class 40-2
0040 3 class 40-3
0041 4 class 41-1
0042 5
0042 6

When key in part no 0040, 3 rows under 0040 will be listed out only, filter and match as value entered only. do not show others part no in the combo box selection.

View 1 Replies View Related

Combo Bound Column To Word Bookmark Conflict

Jul 6, 2005

Ok....Just when you think it's all running smoothly.... :(
I have a combo box, MDLastName, with a column count of 9, with column 2 displaying and all others hidden. The selection made with this combo populates 7 corresponding fields (first name, address, etc). It's working perfectly.

The first problem I encountered was with identical last names, but different corresponding data. When I selected Jones, for example, it would populate the first Dr. Jones and his info, listed in the table. However, if I selected the second Dr. Jones in the combo list, it was still populating only the first Dr. Jones' info. I resolved this by binding the fist column (ID, aka primary key), but still hiding all colums but column 2. First problem fixed..

Next, I have a Word Template document bookmarked to receive data from the form, frmDenial. I have all the coding working fine and dandy to insert the data from the fields on the form, save, and print. However, instead of inserting the text from the MDLastName, it is inserting the primary key (because it is the bound column in the combo box). Now, because of the first problem discussed above, I cannot change the bound column to column 2 (containing the data I need in the Word Template). How can I get the right info to appear in my template with the bookmarks?

View 1 Replies View Related

Bound Cascading Combo Boxes In Continous Forms

Jul 19, 2006

My goal is to have two combo boxes the first filters the second. it controls the semester that I am viewing. This works if i don't use continous forms but when i do it requeries every record in the form instead of the current record. I am not an access or vb guy but i have picked a lot up. please help!!!


I have attached a copy of my database.

View 4 Replies View Related

Forms :: Bound Column In A Combo Box - Transfer Two Values

Jul 9, 2014

In my form my combo box displays a list from a query called DORP-HDR that has 3 columns

DORP-ID | CODE | NAME

and displays them like that is the drop down list

The form field that the combo is bound to takes the numeric-id field as its value. In the combo control wizard i nominated that value, and in the properties pane bound column value is 1.

and in the properties pane the row source is:

SELECT [DORP HDR].[DORP-ID], [DORP HDR].[CODE], [DORP HDR].[NAME] FROM [DORP HDR] ORDER BY [NAME];

So far so good. I have created lots of combo boxes before like this.

But this time i want the second field in the list (CODE) ALSO bound to another field in my form . So I want the combo to transfer two values not one. How do i do this?

View 4 Replies View Related

Adding New Value To Combo Box

May 31, 2007

hello,

I have 10 combo boxes on a form looking up at the same table (fileld A). I want the user to be able to enter a new value (that's not in the table and therefore neither it is in the combo box) to the 1st combo Box (let's say) and that same value to be automatically added to the table, so when I use the next (2nd one) combo Box, that same value is already in the table.

How can I do this??

Thank you very much

View 1 Replies View Related

Adding A New Value To A Combo Box

Dec 8, 2004

I need code for the 'On Not In List' event procedure so that users can add a new item to a combo box...
its just a simple combo box linked to values in a table
any help would be great
thanks

View 9 Replies View Related

Adding A Combo Box To Query

Aug 2, 2006

Hi,

I'm trying to add a combo box to my query so when I select the item from the combo box it executes my query. I don't know where to begin... Any help??

View 7 Replies View Related

Adding A Record For A Combo Box

Mar 4, 2005

I have two related tables - one is study information and one is person information. For each study, a person is assigned. On my form, I have a combo box to choose a person to add to a study. This works fine when the person exists already. To add a new person, I have an "add" command button that brings up a form to add a new person to the table. Problem is when I close the form, I'd have to find the person in the combo box to add them to the study. Is there a way to add a "person record" to the person table and when I return to the study form, have that new person already associated with the study? I don't allow users to edit the person info from the study form (the same person may be associated with different studies). Any ideas to help? Thank you.

View 2 Replies View Related

Adding Records To A Combo Box

May 17, 2005

Hi all,

I have a data entry screen that requires the user to select a assessment type from a combo box that gets its values from a separate table. So far i have 3 Assessment types, these are Quality, Manufacturing and Technical.

If the assessment type they want is not is the combo box list. I want them to be able to type in the assessement type in the combo box and have it saved to the assessment type list so that in future it will be availible directly from the combo box.

Any ideas on how i can do this as it's giving me a head ache....

Many thanks in advance.

El Cid

View 8 Replies View Related

Adding A Record From A Combo Box

Jan 15, 2005

I'd like to create a combo box that is not limited to the list of records from a table, but allows the user to add to the table by typing into the combo box. I believe I write this code in the "after Update" event, but I'm not sure of the syntax. Can someone help?

The combo box is simply displaying the records from another table...so the code would add a record.

Thanks much!

View 7 Replies View Related

Adding A Record Through Combo Box

Mar 13, 2013

I would like to add a value that i choose from a combo box to a table by clicking a button after selecting it from the combo box, and i do not know how to do it?

View 11 Replies View Related

Adding Combo Box To One Of Columns

Sep 26, 2011

I am extremely new to access. I am trying to add a combo box to one of my columns. Basically i have about ten columns of which a couple of them I want to have combo boxes so that the information that is in each of these columns is standardized. Currently all I have is my ten columns with headings set out.

View 3 Replies View Related

Adding Item To Combo Box With VBA

Apr 1, 2012

I've created a simple form with a combo box, using wizard, and I create this code. for to add items when isnotinlist event. After requery, old data are changed to primary id numbers.

E.g.

Nametxt, id=1
Surnamext, id=2
Agetxt id =3

When i add a new item, the first item nametxt, converts to 1. This is the id. Here is the code

Dim cnn1 As ADODB.Connection
Set cnn1 = CurrentProject.Connection
Dim rs As New ADODB.Recordset
rs.ActiveConnection = cnn1
rs.Open " SELECT * from affectiontbl ", cnn1, adOpenDynamic, adLockPessimistic

[Code] ....

View 12 Replies View Related

Combo Box - Adding Further Info - Not In List

Dec 6, 2006

Does anyone know of a way to allow a user to add further info to another field on the same record that's created by a combo box that is using the Not In List method?

Dim strsql As String
Dim i As Integer
Dim Msg As String

'Exit this sub if the combo box is cleared
If NewData = "" Then Exit Sub

Msg = "'" & NewData & "' is not in the list of Callers names." & vbCr & vbCr
Msg = Msg & "Do you want to add it?"

i = MsgBox(Msg, vbQuestion + vbYesNo, "Unknown Caller...")
If i = vbYes Then
strsql = "Insert Into tblCallersName([CallersName]) values ('" & NewData & "')"
CurrentDb.Execute strsql, dbFailOnError
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If

I need to log a persons name & phone number without having to re enter it again the next time.

To log the name I use a combo box that lists all the previously added names & it also allows you to add further details if the name does not already exist

I now need to work out how to also add the phone number without having to manually go into the names table to add it in.

If anyone understands what I'm talking about then you're halfway there :D

See attached db



thanks

View 2 Replies View Related

Adding Items To Combo Boxes

Sep 4, 2005

Hey Guy and Ladies,

In one database (Originally an Orders Database created by wizards)

This code to add items to a drop down list in the “orders details subform” works fine.


Private Sub ProductID_DblClick(Cancel As Integer)
On Error GoTo Err_ProductID_DblClick
Dim lngProductID As Long

If IsNull(Me![ProductID]) Then
Me![ProductID].Text = ""
Else
lngProductID = Me![ProductID]
Me![ProductID] = Null
End If
DoCmd.OpenForm "Products", , , , , acDialog, "GotoNew"
Me!ProductID.Requery
If lngProductID <> 0 Then Me![ProductID] = lngProductID

Exit_ProductID_DblClick:
Exit Sub

Err_ProductID_DblClick:
MsgBox Err.Description
Resume Exit_ProductID_DblClick
End Sub

When the same code runs in my new database

Private Sub OptionID_DblClick(Cancel As Integer)
On Error GoTo Err_OptionID_DblClick
Dim lngOptionID As Long

If IsNull(Me![OptionID]) Then
Me![OptionID].Text = ""
Else
lngOptionID = Me![OptionID]
Me![OptionID] = Null
End If
DoCmd.OpenForm "Products", , , , , acDialog, "GotoNew"
Me!OptionID.Requery
If lngOptionID <> 0 Then Me![OptionID] = lngOptionID

Exit_OptionID_DblClick:
Exit Sub

Err_OptionID_DblClick:
MsgBox Err.Description
Resume Exit_OptionID_DblClick
End Sub

I get the error message

“You tried to assign the Null value to a variable that is not a Variant date type”

Any suggestions?

Also if anyone knows a better way to add items to a list box “On the Fly” I would really appreciate it.

It would be nice if you could type in the value and it would automatically add it to the list for future use.

Thanks for all of your help,
Joe

View 7 Replies View Related

Adding Combo Data To Fields

Mar 15, 2006

I have a Combo Box that places the Address into the given Address field. How can I have it place the second and third cloumns, from the Combo Box into the next two adjacent fields on the Form (Last Name & First Name)?
Please describe in detail, not just code, but where a how it goes. I am new at this thing.

View 1 Replies View Related

Adding Combo Box Data To A Table

Jul 28, 2005

I have an existing FORM called Evaluations where you can select a trainer and a trainee from two different combo boxes. Once a name is selected from both of the combo boxes I click on an assign button and I want it to record those two names selected into my evaluations table in the Trainer_Name and Trainee_Name columns.

How do I do that??? Please help??

Thanks

View 2 Replies View Related

Adding Different Due Date For Different Combo Box Selections

Apr 9, 2015

I'm working on a database where users enter an assignment into a datasheet form. Assignments are selected from a combo box that has values stored in a table. After choosing the assignment, the user adds the date it was completed. After this is done, I would like the "Next Due" column to update. Each assignment will have a different next due date, such as one year from the completion date, six months, etc. I don't know how to add different values depending on the combo box selection.

View 5 Replies View Related







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