If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
value from combobox or user value
Hi,
I'm starting to program some forms with combobox which value is criteria for a query. This combobox is based on a table. I want user to select one of the value from that table (this is ok) OR user specified criteria (* or like "abc*"). Is that possible? Thanks karmela |
#2
|
|||
|
|||
value from combobox or user value
Is that possible?
Yes. Had you posted your query SQL, form name, combobox name, and and textbox user would enter thier data then I could have edited it for you. Otherwise maybe you can decipher this -- WHERE [YourField] = [Forms]![YourFormName]![ComboBoxName] OR [YourField] Like [Forms]![YourFormName]![TextBoxName] & "*" -- KARL DEWEY Build a little - Test a little "karmela" wrote: Hi, I'm starting to program some forms with combobox which value is criteria for a query. This combobox is based on a table. I want user to select one of the value from that table (this is ok) OR user specified criteria (* or like "abc*"). Is that possible? Thanks karmela |
#3
|
|||
|
|||
value from combobox or user value
Hi,
as I see, it means combobox for values from the table AND textbox for entering user-defined values? I though about the property of combobox Limit to List, so it should accept user entered value. This [Forms]![YourFormName]![ComboBoxName] I have in criteria of the query and the same with & "*" after it, but it does not function. karmela KARL DEWEY p*še: Is that possible? Yes. Had you posted your query SQL, form name, combobox name, and and textbox user would enter thier data then I could have edited it for you. Otherwise maybe you can decipher this -- WHERE [YourField] = [Forms]![YourFormName]![ComboBoxName] OR [YourField] Like [Forms]![YourFormName]![TextBoxName] & "*" -- KARL DEWEY Build a little - Test a little "karmela" wrote: Hi, I'm starting to program some forms with combobox which value is criteria for a query. This combobox is based on a table. I want user to select one of the value from that table (this is ok) OR user specified criteria (* or like "abc*"). Is that possible? Thanks karmela |
#4
|
|||
|
|||
value from combobox or user value
This [Forms]![YourFormName]![ComboBoxName] I have in criteria of the query
and the same with & "*" after it, but it does not function. 'does not function' tells me nothing. Is there an error message and if so what is it? Too many records, no records, wrong records? Post your SQL statement. -- KARL DEWEY Build a little - Test a little "karmela" wrote: Hi, as I see, it means combobox for values from the table AND textbox for entering user-defined values? I though about the property of combobox Limit to List, so it should accept user entered value. This [Forms]![YourFormName]![ComboBoxName] I have in criteria of the query and the same with & "*" after it, but it does not function. karmela KARL DEWEY p*še: Is that possible? Yes. Had you posted your query SQL, form name, combobox name, and and textbox user would enter thier data then I could have edited it for you. Otherwise maybe you can decipher this -- WHERE [YourField] = [Forms]![YourFormName]![ComboBoxName] OR [YourField] Like [Forms]![YourFormName]![TextBoxName] & "*" -- KARL DEWEY Build a little - Test a little "karmela" wrote: Hi, I'm starting to program some forms with combobox which value is criteria for a query. This combobox is based on a table. I want user to select one of the value from that table (this is ok) OR user specified criteria (* or like "abc*"). Is that possible? Thanks karmela |
#5
|
|||
|
|||
value from combobox or user value
Hi,
Im sorry - SQL of the query is quite long... When I do not write anything to the combobox, there is error message "Property not found", I think there should be some procedure on NotInList property, but I have no idea, what to write .... I'm not really strong in it, it's my first db. Thanks a lot karmela SELECT faktury_dodavatel.Rok, faktury_dodavatel.[SAS č*slo dokladu], faktury_dodavatel.[Č*slo dodavatele], Dodavatele.Dodavatel, faktury_dodavatel.[Č*slo faktury], DateSerial(Left(faktury_dodavatel![Datum faktury],4),Mid(faktury_dodavatel![Datum faktury],5,2),Right(faktury_dodavatel![Datum faktury],2)) AS [Datum faktury], faktury_dodavatel.[SAS č*slo d*lu], faktury_dodavatel.[Č*slo d*lu], faktury_dodavatel.[Počet ks], Round((faktury_dodavatel![Hodnota faktury]/faktury_dodavatel![Počet ks])*Dimenze!Dimenze_ks,2) AS [Cena na faktuře], CStr(faktury_dodavatel![Hodnota faktury]) AS [Hodnota faktury], Round(([Dorovnaná hodnota]/faktury_dodavatel![Počet ks])*Dimenze!Dimenze_ks,2) AS [Cena dorovnaná], CStr(IIf((dorovnani_dodavatel![Hodnota faktury nová]) Is Null,faktury_dodavatel![Hodnota faktury],dorovnani_dodavatel![Hodnota faktury nová])) AS [Dorovnaná hodnota], dorovnani_dodavatel.[Datum dorovnani], cenik_nakup.[A cena], cenik_nakup.MTZ, cenik_nakup.LN, cenik_nakup.Dimenze_ks, cenik_nakup.Měna, cenik_nakup.[Platnost od], cenik_nakup.[Platnost do], CStr(Round(cenik_nakup![A cena]+cenik_nakup!MTZ+cenik_nakup!LN+cenik_nakup!LS,2)) AS [Součet ceny], Round(([Cena faktury]/faktury_dodavatel![Počet ks])*cenik_nakup!Dimenze_ks,2) AS [Nová cena], Round(IIf(cenik_nakup![A cena] Is Null,0,(cenik_nakup![A cena]+cenik_nakup!MTZ+cenik_nakup!LN)*faktury_dodavatel ![Počet ks]/cenik_nakup!Dimenze_ks),2) AS [Cena faktury], Round([Dorovnaná hodnota]-[Cena faktury],2) AS Rozd*l, DateSerial(Left(faktury_dodavatel![Datum př*jmu],4),Mid(faktury_dodavatel![Datum př*jmu],5,2),Right(faktury_dodavatel![Datum př*jmu],2)) AS [Datum př*jmu] FROM Dimenze INNER JOIN (Dodavatele INNER JOIN (cenik_nakup RIGHT JOIN (faktury_dodavatel LEFT JOIN dorovnani_dodavatel ON (faktury_dodavatel.[Počet ks] = dorovnani_dodavatel.[Počet ks]) AND (faktury_dodavatel.[SAS č*slo dokladu] = dorovnani_dodavatel.[SAS č*slo dokladu]) AND (faktury_dodavatel.Rok = dorovnani_dodavatel.Rok) AND (faktury_dodavatel.[Č*slo d*lu] = dorovnani_dodavatel.[Č*slo d*lu])) ON cenik_nakup.D*l = faktury_dodavatel.[Č*slo d*lu]) ON Dodavatele.[Č*slo dodavatele] = faktury_dodavatel.[Č*slo dodavatele]) ON Dimenze.Dimenze = faktury_dodavatel.Dimenze WHERE (((faktury_dodavatel.[Č*slo dodavatele])=[Forms]![frm_Dodavatel]![Dodavatel] & "*") AND ((DateSerial(Left([faktury_dodavatel]![Datum faktury],4),Mid([faktury_dodavatel]![Datum faktury],5,2),Right([faktury_dodavatel]![Datum faktury],2)))=[cenik_nakup]![Platnost od] And (DateSerial(Left([faktury_dodavatel]![Datum faktury],4),Mid([faktury_dodavatel]![Datum faktury],5,2),Right([faktury_dodavatel]![Datum faktury],2)))=[cenik_nakup].[Platnost do])) OR (((cenik_nakup.[A cena]) Is Null)); "KARL DEWEY" wrote: This [Forms]![YourFormName]![ComboBoxName] I have in criteria of the query and the same with & "*" after it, but it does not function. 'does not function' tells me nothing. Is there an error message and if so what is it? Too many records, no records, wrong records? Post your SQL statement. -- KARL DEWEY Build a little - Test a little "karmela" wrote: Hi, as I see, it means combobox for values from the table AND textbox for entering user-defined values? I though about the property of combobox Limit to List, so it should accept user entered value. This [Forms]![YourFormName]![ComboBoxName] I have in criteria of the query and the same with & "*" after it, but it does not function. karmela KARL DEWEY p*še: Is that possible? Yes. Had you posted your query SQL, form name, combobox name, and and textbox user would enter thier data then I could have edited it for you. Otherwise maybe you can decipher this -- WHERE [YourField] = [Forms]![YourFormName]![ComboBoxName] OR [YourField] Like [Forms]![YourFormName]![TextBoxName] & "*" -- KARL DEWEY Build a little - Test a little "karmela" wrote: Hi, I'm starting to program some forms with combobox which value is criteria for a query. This combobox is based on a table. I want user to select one of the value from that table (this is ok) OR user specified criteria (* or like "abc*"). Is that possible? Thanks karmela |
Thread Tools | |
Display Modes | |
|
|