Combo box default value multiautocomplete

Hi All
i have a subform with 10 item. The first one is a combo box that can choose
the value from a list that is linked to a table with many record.
This subform is related to the master form with 

link master field    codice,cognome,nome
link child field       codice,cognome,nome

that are the other items that are not visualize in the subform. These link
give me the right connection to the master form.

Normally when i choose the value from list (table) i place also all the other
item in the subform using this code in after update precedure

Me.ISEE.Value = Me.ISEE.Column(0)
Me.F_Costo_con_Mensa_I_Figlio.Value = Me.ISEE.Column(1)
Me.F_Costo_con_Mensa_II_Figlio.Value = Me.ISEE.Column(2)
Me.F_Costo_con_Mensa_III_Figlio.Value = Me.ISEE.Column(3)
Me.F_Costo_senza_Mensa_I_Figlio.Value = Me.ISEE.Column(4)
Me.F_Costo_senza_Mensa_II_Figlio.Value = Me.ISEE.Column(5)
Me.F_Costo_senza_Mensa_III_Figlio.Value = Me.ISEE.Column(6)
Me.Costo_Soggiorno.Value = Me.ISEE.Column(7)
Me.Costo_Soggiorno_II_Figlio.Value = Me.ISEE.Column(8)
Me.Costo_Soggiorno_III_Figlio.Value = Me.ISEE.Column(9)

this work fine and when i choose ISEE value from the combo list all the items
of the subform have the good value.
The problem arrive when i try to use a default value in the combo box, infact
when i put 
[ISEE].[itemData](0) 
in the default value of the combo box ,i have the correct value but all the
other item are zero!!!!
I need always to re-choose the value in the combo box to have all item with
the correct value.

How can avoid this fastidious effect ?

Thank you in advance for your help

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200704/1

0
Diego
4/6/2007 9:48:02 AM
access.formscoding 7493 articles. 0 followers. Follow

2 Replies
636 Views

Similar Articles

[PageSpeed] 30

Diego via AccessMonster.com wrote:
>i have a subform with 10 item. The first one is a combo box that can choose
>the value from a list that is linked to a table with many record.
>This subform is related to the master form with 
>
>link master field    codice,cognome,nome
>link child field       codice,cognome,nome
>
>that are the other items that are not visualize in the subform. These link
>give me the right connection to the master form.
>
>Normally when i choose the value from list (table) i place also all the other
>item in the subform using this code in after update precedure
>
>Me.ISEE.Value = Me.ISEE.Column(0)
>Me.F_Costo_con_Mensa_I_Figlio.Value = Me.ISEE.Column(1)
>Me.F_Costo_con_Mensa_II_Figlio.Value = Me.ISEE.Column(2)
>Me.F_Costo_con_Mensa_III_Figlio.Value = Me.ISEE.Column(3)
>Me.F_Costo_senza_Mensa_I_Figlio.Value = Me.ISEE.Column(4)
>Me.F_Costo_senza_Mensa_II_Figlio.Value = Me.ISEE.Column(5)
>Me.F_Costo_senza_Mensa_III_Figlio.Value = Me.ISEE.Column(6)
>Me.Costo_Soggiorno.Value = Me.ISEE.Column(7)
>Me.Costo_Soggiorno_II_Figlio.Value = Me.ISEE.Column(8)
>Me.Costo_Soggiorno_III_Figlio.Value = Me.ISEE.Column(9)
>
>this work fine and when i choose ISEE value from the combo list all the items
>of the subform have the good value.
>The problem arrive when i try to use a default value in the combo box, infact
>when i put 
>[ISEE].[itemData](0) 
>in the default value of the combo box ,i have the correct value but all the
>other item are zero!!!!


Use the form's Current event:

If Me.NewRecord Then
	Me.F_Costo_con_Mensa_I_Figlio = _
									Me.ISEE.Column(1,ISEE.ListIndex)
	Me.F_Costo_con_Mensa_II_Figlio = _
									Me.ISEE.Column(2,ISEE.ListIndex)
		. . .
End If

If all those controls are unbound then you probably don't
want the line:
	If Me.NewRecord Then

Also, the line:
	Me.ISEE.Value = Me.ISEE.Column(0)
serves no purpose and should be removed.

-- 
Marsh
MVP [MS Access]
0
Marshall
4/7/2007 5:49:03 PM
Great it works !!!!!

Thank you very very much !!!

Diego

Marshall Barton wrote:
>>i have a subform with 10 item. The first one is a combo box that can choose
>>the value from a list that is linked to a table with many record.
>[quoted text clipped - 27 lines]
>>in the default value of the combo box ,i have the correct value but all the
>>other item are zero!!!!
>
>Use the form's Current event:
>
>If Me.NewRecord Then
>	Me.F_Costo_con_Mensa_I_Figlio = _
>									Me.ISEE.Column(1,ISEE.ListIndex)
>	Me.F_Costo_con_Mensa_II_Figlio = _
>									Me.ISEE.Column(2,ISEE.ListIndex)
>		. . .
>End If
>
>If all those controls are unbound then you probably don't
>want the line:
>	If Me.NewRecord Then
>
>Also, the line:
>	Me.ISEE.Value = Me.ISEE.Column(0)
>serves no purpose and should be removed.
>

-- 
Message posted via http://www.accessmonster.com

0
Diego
4/11/2007 8:49:47 AM
Reply:

Similar Artilces:

How to get a certain font to come up as the default font in Publis
I want to use Arial font, and Times New Roman is locked in, and when I forget I have to go back and change everything. Setting Text Defaults using Normal.pub http://ed.mvps.org/Static.aspx?=Publisher/normal.pub -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Larry" <Larry@discussions.microsoft.com> wrote in message news:D52596EE-BA20-494C-83F2-4C2848E1D472@microsoft.com... >I want to use Arial font, and Times New Roman is locked in, and when I forget > I have to go back and change everything. ...

default configuration
I am hoping someone can help me. When I open a .jpg attachment my outlook uses ADOBE photoshop to open the attachment. How can I change the application outlook is using to open *.jpg's. This is not caused by Outlook but it is a general Windows setting; Control Panel-> Folder Options-> tab File Types -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -What do the Outlook Icons Mean? -Create an Office 2003 CD slipstreamed with Service Pack 1 ----- "Sherry" <Sherry@discussions.microsoft.com> wrote in message news:6FF1650E-EDC7-4E7F-9CB0-C...

Using dates for x-axis values as string instead of creating a scale
I am creating a line graph where I want to identify each point on the graph by a date (i.e. the source of the x-axis is to a column full of dates). When I do this, excel puts the dates on a scale, so a lot of my data is bunched up in the center of the graph. Is there any way to format the dates as text for use in the graph without the text version of the dates being the unreadable number format? Or, is there any way to stop excel from putting my dates on a scale? Thanks! -Eleanor -- cs_weirdo You can change the axis back to a category type, instead of a time scale type. Choose Chart...

Lookup value and control depends on lookup result
I have 1 qry & 1 form. Query named : QRY_bl_SalesInvoice BL no. Sales Invoice BL001 IV509999 BL002 (blank) BL003 IV507777 Under the FORM, drop-down box named “dropdownBL” is used by user to select BL no. under the qry on (a). Questions : How I set the following controls, Case 1 : If BL no. under the drop-down box “dropdownBL” after select = BL002 (with Sales Invoice=blank under the QRY) , then free to input on the field named “Sales Invoice" Case 2 : If BL no. under the drop-down box “dropdownBL” after select ...

Query on multiple keys
I have a table that looks like this: ClientID RevisionNum --------------------------------- 10000 1 10000 2 10000 3 10000 4 20000 1 20000 2 30000 1 30000 2 30000 3 30000 4 40000 1 40000 2 40000 3 I would like to great a query that will return the following records: ClientID RevisionNum --------------------------------- 10000 4 20000 2 30000 4 40000 3 That is, I only want the record with the top value of RevisionNum. Any suggestions? On 10 May 2007 19:53:31 -0700, timorrill <timothy.morrill@gmail.com> wrote: &...

How can we get rid of the "Save" pop up box at the end of application?
Whenever the user closes the excel sheet, it pops up an "save?" pop up. Is there a way to get rid of this? --- Message posted from http://www.ExcelForum.com/ It should only ask that question if it thinks you have altered data on the sheet. The only way around this is to write a macro and place a button on the sheet that would close the sheet with one click without asking to save it first. You may be able to use an auto_Run macro to tell the sheet that you have already saved it and don' ask again. If you know how to do macros, the magic code is. sub CloseSheet() acti...

Multi-value paramter syntax...help
How do I write the syntax for a stored procedure that has one parameter but accepts multiple values. I am running a report from reporting services that can pass multiple values or pass all values to the stored procedure stored procedure 1: exec getcolor @color = blue....this runs fine. stored procedure 2: exec getcolors @colors in('red', 'white', 'blue').........bombs code is create procedure getcolors @colors nvarchar (50) as (select * from hrs_by_activity where color in(@colors) ) need help making this work. thanks in advance O...

Error: unable to set the value property of the series class
Hi I have a serious problem with a chart that I made using VBA. I get the error: Runtime error 1004: "Unable to set the values property of the series class" and sometimes the same error but just for the named property of the series. The chart is a standard lines chart. I hope somebody can help me Below is the section of code that is flagged: Sub ChartOptions() ' this sets up the QC Graph for the main lab with Chart title, ' axis title and scale of Y-axis according to each parameter Sheets("Calcs").Select ActiveCell = Cells(3, 2) ActiveCell.Offset(...

Edit box banner text question
I've seen banner text used in edit boxes and have recently discovered how to implement it myself. My question is, is there a way to make it stay visible when the edit box has focus (as long as the edit box is empty) the way it does in Vista's login screen? I'd like to be able to do this in any OS from XP (SP2) and newer. Having the banner text remain visible when the edit box has focus would be extremely handy for dialogues and property sheet pages that open with the focus on an empty edit box. >I've seen banner text used in edit boxes and have recently discovered how...

combo boxes
Hi I put a post on yesterday, trying to get help and now can't even find my original post! Someone did point me in the direction for some help, but am now all tied in knots and really need help. I have a sub form which should enable the user to select a supplier (combo box) and then in the next combo box allow the user to select a list of products from that individual supplier, however it is not working. I spent 12 hours trying to solve this yesterday and am about to give up and stick to using an excel spreadsheet (which while I am a huge fan of excel, is not the answ...

Drop Down Boxes for Validation Cells are Too Wide
For some reason, in some columns of my spreadsheet the validation drop down boxes are too wide for the cell. In column A, for example, they will be the width of the cell plus the dropdown arrow - perfect. In column C they will exceed the width of the cell plus the drop down arrow. How do I fix this? Extra wide dropdown lists appear occasionally, usually if cells on the worksheet have been merged (not necessarily the cell with the data validation). To get rid of them, you may have to delete the row or column and recreate the data validation. Geoff wrote: > For some reason, in some...

PM
Is there an option to set the default date for the Void Date to the current date vs. the trasaction date? Meaning that I want to use the current date as the posting date instead of the doc date, without having to remember to change it manually (senility). Thanks Jeff G Jeff, There is no option to do this, you have to keep changing the date manually unless you want to have a customization that does this. -- Victoria Yudin GP MVP "Jeff G" <jgarrison@theathletesfoot.com> wrote in message news:uJCMQ8hQGHA.2692@TK2MSFTNGP14.phx.gbl... > Is there an option to set t...

Combo link on the form
Hi, I am trying to get a link on the form that has a field to link the combo list. Each record has the different combo list. Query - DATA has the field call GroupCD Table for Combo List has two fields..... GroupCD and List On the form, I want the GroupCD link to GroupCD (ComboList) so that each record has the own combo based on the table (Combo List). Your help would be much appreciated. Thanks ...

How do I change a default Message Delivery option?
I have a user who has managed to change his default email option to have "Expires after" turned on by default. I would like it turned off. I've tried turning it off and saving it as a template, but I would like it off in the default case... ...

Replacing Formula with a Value
Is there a way in native EXCEL to replace a formula with a value, so a value is then stored in the cell. I have a formula which checks if the date in each row is today's date, using the TODAY() function. I it evaluates true (today's date), then I read the values from a row of cells near the top of the sheet. I want to be able to replace the formula with a value if the formual evaluates true. Thanks for your help. Copy the cell(s) in question, then choose Edit | Paste Special... and choose "values" in the dialog. Click OK, and the formula will be replaced. -- HTH - ...

Select distinct with anonymous type return error when one value is null
Hi, How can i do this query with anonymous types; SELECT DISTINCT IdTable2, Name FROM Table1 WHERE idTable2 != null This query return error if the idTable2 is null: bindingSource1.DataSource=MyDataSet.Table1.Select(c=> new {Id=c.IdTable2, Nome=c.Name }.Distinct(); Any idea? Thanks ...

Forms Combo Box
Does anyone know haw to make the Forms Combo box font bigger?? No can do. You could try the Controls toolbox one, but not recommended if usin several controls because these ones are very buggy. More properties more trouble -- Message posted from http://www.ExcelForum.com ...

Concatenate shows "square boxes" unknown characters at paragraph e
Concatenate shows "square boxes" unknown characters at paragraph end Hi, I was wondering if anyone can tell me why I am getting the funky unknown character "square boxes" at the end of my concatenated paragraphs. I get the unknown characters at the end of the last line and it does not matter whether there are 2, 3, or more lines in the paragraph. My control for the text box is this: =IIf(IsNull([REV_B]),"",[REV_B] & (Chr(13) & Chr(10)+[REV_C]) & (Chr(13) & Chr(10)+[REV_D])) Basically, it says if REV_B is null then don't display anythin...

Check box on continuous form
I have a continuous form listing available parts. I need to be able to select a part from the list using a check box (or something that will give a true if selected). I tried an unbound check box, but when clicked, it selects all of the records in the form instead of only the one record. Am I missing a setting? or what can I do to create this selection capability. (which I am then using code to complete the action I need) Thanks Sue On Dec 19, 1:13 pm, Design by Sue <Designby...@discussions.microsoft.com> wrote: > I have a continuous form listing available parts. I need to...

Lock Box for Great Plains Standard?
Does anyone know of a lockbox module for Great Plains Standard edition? ...

Macros: Pasting a value into a rename dialogue box
I am trying to write a macro which will: 1) Make a copy of the current worksheet 2) _Copy_ the value from the D9 cell 2) Rename the copied worksheet by selecting "rename worksheet" and then pressing _paste_ into the rename dialogue box. The data in D9 cell is manually changed each time before the macro is run. Hence, every copy of the current work sheet should have a different name. I record this macro using the "recorded macro command". However, the macro recorder doesn't record the fact that I have clicked paste in the rename dialogue box: It merely records the valu...

MODIFYING DEFAULT ADDRESS BOOK
Hello. I have a number (roughly 2000) of Exchange users that I do not want to show in the Global Address List (temporarily). Rather than go one by one and hide each form the global address list, I wanted to modify, or create a new global address list. The problem is, when I create a new address list with a new filter, my Outlook users still get the default address book. How can I fix this? Thanks for the help. First, a little scripting can probably assist with the Hide from Address Book. Second, you have to change the rights on the Default GAL for who can see it. Now, for Outlook ...

combo and text boxes to search a form
I have 3 fields, two of which are combo boxes the third is a text box. I can get it to search using both the combo boxes but not all three together, my code looks like the following. Private Sub Searches_the_Main_Form_Click() On Error GoTo Err_Searches_the_Main_Form_Click Dim stDocName As String Dim stLinkCriteria As String stDocName = "Main" stLinkCriteria = "[Concession_or_Range?]='" & Me! [Concession_or_Range?] & "'" stLinkCriteria = stLinkCriteria & " AND [Concession_Range_Number]='" & Me![Concession_R...

only value
Hi, I've got rand() function in a cell. What's the way to exclude function so only value stays in a cell? Thanx alekm Hi first copy the cell and insert the value with 'Edit - Paste Special - Values' >-----Original Message----- >Hi, >I've got rand() function in a cell. What's the way to exclude function so >only value stays in a cell? > >Thanx > >alekm >. > Thanx. Is there any shortcut from keyboard? alekm "Frank Kabel" wrote: > Hi > first copy the cell and insert the value with 'Edit - > Paste Special - V...

Extract data from a cell after a constant value
Howdy All, I have a spreadsheet that contains 1 column of data, if the cells of the column are the city names and populations of towns in the following format: Appleton, Wisconsin (WI) (pop. 70,087) The 'pop.' is always present. I want to extract just the population number (ie: 70,087) from these cells into another cell. What is the simplest way to accomplish this? Thank you, Brian On Sun, 19 Aug 2007 12:29:37 -0500, "Wolfman" <wolfmanx@charter.net> wrote: >Howdy All, > >I have a spreadsheet that contains 1 column of data, if the cells of the >...