G
Guest
Good morning, I asked two days ago about how to design a code in VB that
automatically define a criteria; a code has been sent:
Set dbs = CurrentDb
Set qdf = dbs.QueryDefs("Salidas")
qdf.Parameters(0) = "nota"
Set rst = qdf.OpenRecordset(dbOpenSnapshot, dbReadOnly)
rst.MoveLast
rst.MoveFirst
ListBoxName.RowSource="SELECT * FROM Salidas WHERE tipo
IN('facturas', 'notas', 'Sal. Int') "
The problem is that this code doesn’t works; I’m a pretty good VB excels
programmer, but about acces I don’t know a thing.
My query name is “Salidasâ€, I have a column called “Tipo†in this column
exists tree kinds of entries “nota†“factura†and “S.Intâ€, I want to define 4
differents criterias, 1.â€nota†or “factura†2.â€Factura†3.â€Nota†4.â€S.Intâ€
thise criterias are going to be linked to some buttons that I have in a form.
Could you tell me how to use the code attached or suggest me another code,
please remember that I’m just starting to use acces.
TIA
Pd. Also explain me where to put the code.
automatically define a criteria; a code has been sent:
Set dbs = CurrentDb
Set qdf = dbs.QueryDefs("Salidas")
qdf.Parameters(0) = "nota"
Set rst = qdf.OpenRecordset(dbOpenSnapshot, dbReadOnly)
rst.MoveLast
rst.MoveFirst
ListBoxName.RowSource="SELECT * FROM Salidas WHERE tipo
IN('facturas', 'notas', 'Sal. Int') "
The problem is that this code doesn’t works; I’m a pretty good VB excels
programmer, but about acces I don’t know a thing.
My query name is “Salidasâ€, I have a column called “Tipo†in this column
exists tree kinds of entries “nota†“factura†and “S.Intâ€, I want to define 4
differents criterias, 1.â€nota†or “factura†2.â€Factura†3.â€Nota†4.â€S.Intâ€
thise criterias are going to be linked to some buttons that I have in a form.
Could you tell me how to use the code attached or suggest me another code,
please remember that I’m just starting to use acces.
TIA
Pd. Also explain me where to put the code.