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
|
|||
|
|||
Create form using query doesn't fill fields
Hi,
I have question, I want to create form using query. I made a form in which I choose from one table field, and then the other fields on my form should be filled in with appropriate row from table. I already tried query, and it works. But, when I choose one paramether on my form, and then press command button to refresh form data, nothing happend? Why??? Maybe it's connected with Primary key? I have Primary key in my table, but I think if I didn't do something good, in that case even query shouldn't work?! But, my query works, only I have problem with filling form fields |
#2
|
|||
|
|||
Create form using query doesn't fill fields
It sounds like the fields on your form are bound to a table instead of the
query. Check your datasource for the form - it should be the query. -- Daryl S "Smoki" wrote: Hi, I have question, I want to create form using query. I made a form in which I choose from one table field, and then the other fields on my form should be filled in with appropriate row from table. I already tried query, and it works. But, when I choose one paramether on my form, and then press command button to refresh form data, nothing happend? Why??? Maybe it's connected with Primary key? I have Primary key in my table, but I think if I didn't do something good, in that case even query shouldn't work?! But, my query works, only I have problem with filling form fields |
#3
|
|||
|
|||
Create form using query doesn't fill fields
Datasource is that query, not table. But, nothing happend, still
Any other recommendation? Smoki "Daryl S" wrote: It sounds like the fields on your form are bound to a table instead of the query. Check your datasource for the form - it should be the query. -- Daryl S "Smoki" wrote: Hi, I have question, I want to create form using query. I made a form in which I choose from one table field, and then the other fields on my form should be filled in with appropriate row from table. I already tried query, and it works. But, when I choose one paramether on my form, and then press command button to refresh form data, nothing happend? Why??? Maybe it's connected with Primary key? I have Primary key in my table, but I think if I didn't do something good, in that case even query shouldn't work?! But, my query works, only I have problem with filling form fields |
#4
|
|||
|
|||
Create form using query doesn't fill fields
Me again
It was my mistake, I changed command button, and it works now ))))) But, my main problem is not solve yet. Actually, I wanted with this form to find, and then change some data in my base. It's base of network equipment, and some equipment has been changed (location of equipment, for example). So, I want to find specific equipment, and then to change some options about that. But, when I change location, then on all places in base (where that location was) it has been changed to this new one. Why? Smoki "Smoki" wrote: Datasource is that query, not table. But, nothing happend, still Any other recommendation? Smoki "Daryl S" wrote: It sounds like the fields on your form are bound to a table instead of the query. Check your datasource for the form - it should be the query. -- Daryl S "Smoki" wrote: Hi, I have question, I want to create form using query. I made a form in which I choose from one table field, and then the other fields on my form should be filled in with appropriate row from table. I already tried query, and it works. But, when I choose one paramether on my form, and then press command button to refresh form data, nothing happend? Why??? Maybe it's connected with Primary key? I have Primary key in my table, but I think if I didn't do something good, in that case even query shouldn't work?! But, my query works, only I have problem with filling form fields |
#5
|
|||
|
|||
Create form using query doesn't fill fields
Smoki -
Are you saying that when you change one record on the form that it updates multiple records in the database? Please post your query (data source), and indicate which fields you are changing on the form that are ending up in more than one record in the database. -- Daryl S "Smoki" wrote: Me again It was my mistake, I changed command button, and it works now ))))) But, my main problem is not solve yet. Actually, I wanted with this form to find, and then change some data in my base. It's base of network equipment, and some equipment has been changed (location of equipment, for example). So, I want to find specific equipment, and then to change some options about that. But, when I change location, then on all places in base (where that location was) it has been changed to this new one. Why? Smoki "Smoki" wrote: Datasource is that query, not table. But, nothing happend, still Any other recommendation? Smoki "Daryl S" wrote: It sounds like the fields on your form are bound to a table instead of the query. Check your datasource for the form - it should be the query. -- Daryl S "Smoki" wrote: Hi, I have question, I want to create form using query. I made a form in which I choose from one table field, and then the other fields on my form should be filled in with appropriate row from table. I already tried query, and it works. But, when I choose one paramether on my form, and then press command button to refresh form data, nothing happend? Why??? Maybe it's connected with Primary key? I have Primary key in my table, but I think if I didn't do something good, in that case even query shouldn't work?! But, my query works, only I have problem with filling form fields |
#6
|
|||
|
|||
Create form using query doesn't fill fields
Yes, I wanted to say that, maybe I just didn't explain that good.
But how to send to you my query? Smoki "Daryl S" wrote: Smoki - Are you saying that when you change one record on the form that it updates multiple records in the database? Please post your query (data source), and indicate which fields you are changing on the form that are ending up in more than one record in the database. -- Daryl S "Smoki" wrote: Me again It was my mistake, I changed command button, and it works now ))))) But, my main problem is not solve yet. Actually, I wanted with this form to find, and then change some data in my base. It's base of network equipment, and some equipment has been changed (location of equipment, for example). So, I want to find specific equipment, and then to change some options about that. But, when I change location, then on all places in base (where that location was) it has been changed to this new one. Why? Smoki "Smoki" wrote: Datasource is that query, not table. But, nothing happend, still Any other recommendation? Smoki "Daryl S" wrote: It sounds like the fields on your form are bound to a table instead of the query. Check your datasource for the form - it should be the query. -- Daryl S "Smoki" wrote: Hi, I have question, I want to create form using query. I made a form in which I choose from one table field, and then the other fields on my form should be filled in with appropriate row from table. I already tried query, and it works. But, when I choose one paramether on my form, and then press command button to refresh form data, nothing happend? Why??? Maybe it's connected with Primary key? I have Primary key in my table, but I think if I didn't do something good, in that case even query shouldn't work?! But, my query works, only I have problem with filling form fields |
#7
|
|||
|
|||
Create form using query doesn't fill fields
On Thu, 5 Nov 2009 07:10:07 -0800, Smoki
wrote: Hi, I have question, I want to create form using query. I made a form in which I choose from one table field, and then the other fields on my form should be filled in with appropriate row from table. I already tried query, and it works. But, when I choose one paramether on my form, and then press command button to refresh form data, nothing happend? Why??? Maybe it's connected with Primary key? I have Primary key in my table, but I think if I didn't do something good, in that case even query shouldn't work?! But, my query works, only I have problem with filling form fields Sorry, we cannot see your screen from here... Evidently there is something wrong with the query or with the form. Could you open the query in SQL view and post the SQL text here? What is the form's Recordsource property (it should be the name of the query)? Did you perhaps set the form's Data Entry property to Yes (that will let you add new records but not display existing ones)? -- John W. Vinson [MVP] |
#8
|
|||
|
|||
Create form using query doesn't fill fields
SELECT POPIS.Broj_ID, POPIS.Serijski_broj, DKP.Lokacija, POPIS.Soba,
POPIS.Opis, POPIS.Tip_opreme, Broj.Inventarski_broj, POPIS.Verzija_IOS, POPIS.Datum, POPIS.U_upotrebi, POPIS.Predlog_za_rashod, POPIS.Rashodovan, POPIS.Otudjen FROM DKP INNER JOIN (Broj INNER JOIN POPIS ON Broj.Broj_ID = POPIS.Broj_ID) ON DKP.DKP_ID = POPIS.Lokacija WHERE (((POPIS.Serijski_broj)=[Forms]![TEST izmena po SER BROJU]![Serijski_broj])) ORDER BY POPIS.Serijski_broj DESC; This is my query! Form's recordsource is this query. And Data Entry property is No. But I think I know what is problem, just I don't know how to solve it. Problem is field DKP.Lokacija from other table. So, when I change data, I change it in those other table, not in that specific row in my main table POPIS. But I can't show on my form Lokacija. POPIS, because this field is not with names of locations, then only numbers, and i need full name of location. Do you have any suggestions for my problem?! Smoki "John W. Vinson" wrote: On Thu, 5 Nov 2009 07:10:07 -0800, Smoki wrote: Hi, I have question, I want to create form using query. I made a form in which I choose from one table field, and then the other fields on my form should be filled in with appropriate row from table. I already tried query, and it works. But, when I choose one paramether on my form, and then press command button to refresh form data, nothing happend? Why??? Maybe it's connected with Primary key? I have Primary key in my table, but I think if I didn't do something good, in that case even query shouldn't work?! But, my query works, only I have problem with filling form fields Sorry, we cannot see your screen from here... Evidently there is something wrong with the query or with the form. Could you open the query in SQL view and post the SQL text here? What is the form's Recordsource property (it should be the name of the query)? Did you perhaps set the form's Data Entry property to Yes (that will let you add new records but not display existing ones)? -- John W. Vinson [MVP] . |
#9
|
|||
|
|||
Create form using query doesn't fill fields
Smoki -
You are right on! If you have a field on the form from DKP, then updating that will update the DKP table. What you want to do in your query is show the DKP.Broj_ID on your form instead of the POPIS.Lokacija. Do that by changing the select portion of your query like this (I am assuming that changing the POPIS.Broj_ID field will change the location): SELECT POPIS.Broj_ID, POPIS.Serijski_broj, POPIS.Broj_ID, POPIS.Soba, POPIS.Opis, POPIS.Tip_opreme, Broj.Inventarski_broj, POPIS.Verzija_IOS, POPIS.Datum, POPIS.U_upotrebi, POPIS.Predlog_za_rashod, POPIS.Rashodovan, POPIS.Otudjen FROM DKP INNER JOIN (Broj INNER JOIN POPIS ON Broj.Broj_ID = POPIS.Broj_ID) ON DKP.DKP_ID = POPIS.Lokacija WHERE (((POPIS.Serijski_broj)=[Forms]![TEST izmena po SER BROJU]![Serijski_broj])) ORDER BY POPIS.Serijski_broj DESC; -- Daryl S "Smoki" wrote: SELECT POPIS.Broj_ID, POPIS.Serijski_broj, DKP.Lokacija, POPIS.Soba, POPIS.Opis, POPIS.Tip_opreme, Broj.Inventarski_broj, POPIS.Verzija_IOS, POPIS.Datum, POPIS.U_upotrebi, POPIS.Predlog_za_rashod, POPIS.Rashodovan, POPIS.Otudjen FROM DKP INNER JOIN (Broj INNER JOIN POPIS ON Broj.Broj_ID = POPIS.Broj_ID) ON DKP.DKP_ID = POPIS.Lokacija WHERE (((POPIS.Serijski_broj)=[Forms]![TEST izmena po SER BROJU]![Serijski_broj])) ORDER BY POPIS.Serijski_broj DESC; This is my query! Form's recordsource is this query. And Data Entry property is No. But I think I know what is problem, just I don't know how to solve it. Problem is field DKP.Lokacija from other table. So, when I change data, I change it in those other table, not in that specific row in my main table POPIS. But I can't show on my form Lokacija. POPIS, because this field is not with names of locations, then only numbers, and i need full name of location. Do you have any suggestions for my problem?! Smoki "John W. Vinson" wrote: On Thu, 5 Nov 2009 07:10:07 -0800, Smoki wrote: Hi, I have question, I want to create form using query. I made a form in which I choose from one table field, and then the other fields on my form should be filled in with appropriate row from table. I already tried query, and it works. But, when I choose one paramether on my form, and then press command button to refresh form data, nothing happend? Why??? Maybe it's connected with Primary key? I have Primary key in my table, but I think if I didn't do something good, in that case even query shouldn't work?! But, my query works, only I have problem with filling form fields Sorry, we cannot see your screen from here... Evidently there is something wrong with the query or with the form. Could you open the query in SQL view and post the SQL text here? What is the form's Recordsource property (it should be the name of the query)? Did you perhaps set the form's Data Entry property to Yes (that will let you add new records but not display existing ones)? -- John W. Vinson [MVP] . |
#10
|
|||
|
|||
Create form using query doesn't fill fields
Actually,
my query is like this: SELECT POPIS.Serijski_broj, DKP.Lokacija, POPIS.Soba, POPIS.Opis, POPIS.Tip_opreme, Broj.Inventarski_broj, POPIS.Verzija_IOS, POPIS.Datum, POPIS.U_upotrebi, POPIS.Predlog_za_rashod, POPIS.Rashodovan, POPIS.Otudjen FROM DKP INNER JOIN (Broj INNER JOIN POPIS ON Broj.Broj_ID = POPIS.Broj_ID) ON DKP.DKP_ID = POPIS.Lokacija WHERE (((POPIS.Serijski_broj)=[Forms]![TEST izmena po SER BROJU]![Serijski_broj])) ORDER BY POPIS.Serijski_broj DESC; So, as you see, on my form is DKP.Lokacija from that other table, because POPIS.Lokacija is numbers, not names of locations, POPIS.Lokacija is in Relationship with DKP_Id field in DKP Table. And I need to change value of POPIS.Lokacija, and not to change DKP.Lokacija. Any help?! Smoki "Daryl S" wrote: Smoki - You are right on! If you have a field on the form from DKP, then updating that will update the DKP table. What you want to do in your query is show the DKP.Broj_ID on your form instead of the POPIS.Lokacija. Do that by changing the select portion of your query like this (I am assuming that changing the POPIS.Broj_ID field will change the location): SELECT POPIS.Broj_ID, POPIS.Serijski_broj, POPIS.Broj_ID, POPIS.Soba, POPIS.Opis, POPIS.Tip_opreme, Broj.Inventarski_broj, POPIS.Verzija_IOS, POPIS.Datum, POPIS.U_upotrebi, POPIS.Predlog_za_rashod, POPIS.Rashodovan, POPIS.Otudjen FROM DKP INNER JOIN (Broj INNER JOIN POPIS ON Broj.Broj_ID = POPIS.Broj_ID) ON DKP.DKP_ID = POPIS.Lokacija WHERE (((POPIS.Serijski_broj)=[Forms]![TEST izmena po SER BROJU]![Serijski_broj])) ORDER BY POPIS.Serijski_broj DESC; -- Daryl S "Smoki" wrote: SELECT POPIS.Broj_ID, POPIS.Serijski_broj, DKP.Lokacija, POPIS.Soba, POPIS.Opis, POPIS.Tip_opreme, Broj.Inventarski_broj, POPIS.Verzija_IOS, POPIS.Datum, POPIS.U_upotrebi, POPIS.Predlog_za_rashod, POPIS.Rashodovan, POPIS.Otudjen FROM DKP INNER JOIN (Broj INNER JOIN POPIS ON Broj.Broj_ID = POPIS.Broj_ID) ON DKP.DKP_ID = POPIS.Lokacija WHERE (((POPIS.Serijski_broj)=[Forms]![TEST izmena po SER BROJU]![Serijski_broj])) ORDER BY POPIS.Serijski_broj DESC; This is my query! Form's recordsource is this query. And Data Entry property is No. But I think I know what is problem, just I don't know how to solve it. Problem is field DKP.Lokacija from other table. So, when I change data, I change it in those other table, not in that specific row in my main table POPIS. But I can't show on my form Lokacija. POPIS, because this field is not with names of locations, then only numbers, and i need full name of location. Do you have any suggestions for my problem?! Smoki "John W. Vinson" wrote: On Thu, 5 Nov 2009 07:10:07 -0800, Smoki wrote: Hi, I have question, I want to create form using query. I made a form in which I choose from one table field, and then the other fields on my form should be filled in with appropriate row from table. I already tried query, and it works. But, when I choose one paramether on my form, and then press command button to refresh form data, nothing happend? Why??? Maybe it's connected with Primary key? I have Primary key in my table, but I think if I didn't do something good, in that case even query shouldn't work?! But, my query works, only I have problem with filling form fields Sorry, we cannot see your screen from here... Evidently there is something wrong with the query or with the form. Could you open the query in SQL view and post the SQL text here? What is the form's Recordsource property (it should be the name of the query)? Did you perhaps set the form's Data Entry property to Yes (that will let you add new records but not display existing ones)? -- John W. Vinson [MVP] . |
Thread Tools | |
Display Modes | |
|
|