Click on list item and open a detail form

Works like a charm. Many thanks.
 
Anyway may I ask? Why column (6) when ID is on column (7) in the listbox. For curiosity
 
You missed "where x is the zero-based number of the column with the ID in it". The first column is 0, thus the 7th is 6.
 
I miss a lot of things. not only that.
Thank you again
 
Happy to help! Don't worry, there's a lot to learn; we all miss things along the way.
 
Little help PBaldy.
I made some modifications on the table, rewrite thye db for no mistakes. Now My ID column is the 6th.
I use like yesterday a modified docm counting ID: DoCmd.OpenForm "MascheraPrincipale", , , "ID = " & Me.SearchResults.Column(5)
But when I run it it opens a dialog box asking "enter parameter value" , not opening the secondform.
Can you please take a look? If needed can upload
 
I can look at it if you upload it.
 
You took ID out of the record source of the form being opened. It needs to be included so it can be filtered on.
 
not sure what you mean. The ID is on the tblAnagrafica
 
The record source of MascheraPrincipale is

SELECT tblAnagrafica.CognomeNome, tblAnagrafica.Indirizzo, tblAnagrafica.CAP, tblAnagrafica.Comune, tblAnagrafica.[Tessera sanitaria], tblAnagrafica.[Codice Fiscale]
FROM tblAnagrafica;


should be

SELECT tblAnagrafica.CognomeNome, tblAnagrafica.Indirizzo, tblAnagrafica.CAP, tblAnagrafica.Comune, tblAnagrafica.[Tessera sanitaria], tblAnagrafica.[Codice Fiscale], tblAnagrafica.ID
FROM tblAnagrafica;
 

Users who are viewing this thread

Back
Top Bottom