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 |
#11
|
|||
|
|||
Query and form
Sibbel,
Do you have an empty version of the database you can send to me? From what I can see it should work which means I am missing something. If it shows in the query it should show on the form with no issues, so something else is going on. -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Sibbel" wrote in message ... Hi Gina I'm affraid that didn't work. I'll try to explain another problem, which I think has the same root cause. I have made the form wich has that query (qryTotaalUren) as Record source. This query contains two tables (tblDatabase and Producttypes). All the fields that will be filled in the form will be put into the tblDatabase. These fields are also shown in the query. But when I want to show data on the form from the other table (Producttypes) all the text boxes stay empty. But they are in the query when I open it in datasheet view. For example I want to show "Maximum snelheid" (from the table Producttypes) on the form wich depends on wich "producttype" is filled in. the table tblDatabase contains amongst other things the following fields: ID Datum Ploeg Pers Producttype ProductID the table Producttypes contains amongst other things the following fields: ProductID Producttype Maximum snelheid Normtijd omstellen I have made a relation between ProductID. Do I want the impossible or is there something I have missed? Gr Sibbel -- Facts do not cease to exist because they are ignored. "Gina Whipp" wrote: Sibbel, Change the field name to txtPG. Having the field name and the field source AND using the the that name in the function confuses Access. As for the relationship I would have to see the tables and their relationships to know. However, if the other fields work then I'm going to say they are probably okay. -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Sibbel" wrote in message ... Gina, The table is part of the query. I have run a little test and put another field of that table on the form ([maximum snelheid]), this one also stays blank. The field name is PG and the control source is also PG. Could it be that I have made a "wrong" relation between the two tables that have [producttype] as a common field? [Maximum snelheid] depends on wich [producttype] is choosen on the form and PG uses this [maximum snelheid] to calculate the answer. Greetz Sibbel -- Facts do not cease to exist because they are ignored. "Gina Whipp" wrote: Sibbel, When you say another table, in regards to PG, does that mean the table is NOT part of the query? Also, if PG does in fact show in the query but not in the subform, what is the field name on the form and what is the control source of that field? -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Sibbel" wrote in message ... Gina, That is indeed the part that does not show on the form. When I open this query in datasheet view everything works fine, all the calculations/formulas give the right answer. But when I open my form PG doesn't show any result. The text box stays empty while the others (BG and KG) work immediatly when you enter some data. BG and KG only use data from one table. PG also uses [Maximum snelheid] wich comes from an other table. Gr Sibbel -- Facts do not cease to exist because they are ignored. "Gina Whipp" wrote: Sibbel, Is this the part that does not show? And which field is not in the table that is included in the query? Format(IIf([BG]=" "," ",IIf([Productie]=0," ",(([Aantal geperst]+[Uitval])/([Productie]*60*[Maximum snelheid])))),"#,##0.00") AS PG -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Sibbel" wrote in message ... I'm sorry (Like I said I am new at this) ;-) It's the formula I wrote for "PG" that doesn't show on the form. I hope I have the right thing: SELECT [Tbl Database].Datum, [Tbl Database].Dienst, [Tbl Database].Ploeg, [Tbl Database].Pers, [Tbl Database].Producttype, Producttypes.[Maximum snelheid], [Tbl Database].[Actuele snelheid], [Tbl Database].[Aantal geperst], [Tbl Database].Uitval, [Tbl Database].Productie, [Tbl Database].Omstellen, [Tbl Database].Gereedschapswissel, [Tbl Database].[Geen bediening], [Tbl Database].Proefpersen, [Tbl Database].[Wachten op gereedschap], [Tbl Database].[Wachten op order], [Tbl Database].[Wachten op materiaal], [Tbl Database].Storing, [Tbl Database].Reparatie, [Tbl Database].Uitgepland, [Tbl Database].Opmerkingen, [Tbl Database].[SAP ordernummer], [Tbl Database]!Productie+[Tbl Database]!Omstellen+[Tbl Database]!Gereedschapswissel+[Tbl Database]![Geen bediening]+[Tbl Database]!Proefpersen+[Tbl Database]![Wachten op gereedschap]+[Tbl Database]![Wachten op order]+[Tbl Database]![Wachten op materiaal]+[Tbl Database]!Storing+[Tbl Database]!Reparatie+[Tbl Database]!Uitgepland AS TotaalUren, Format(IIf([TotaalUren]-[Uitgepland]=0," ",[Productie]/([TotaalUren]-[Uitgepland])),"#,##0.00") AS BG, Format(IIf([BG]=" "," ",IIf([Productie]=0," ",(([Aantal geperst]+[Uitval])/([Productie]*60*[Maximum snelheid])))),"#,##0.00") AS PG, Format(IIf([BG]=" "," ",IIf([Aantal geperst]+[Uitval]=0," ",([Aantal geperst]/([Aantal geperst]+[Uitval])))),"#,##0.00") AS KG, Format(IIf([BG]=" "," ",IIf([BG]=0,0,[BG]*[PG]*[KG]*100)),"#,#0.0") AS OEE, ([Aantal geperst]+[Uitval])/([Productie]*60*[Maximum snelheid]) AS [PG test] FROM [Tbl Database] LEFT JOIN Producttypes ON [Tbl Database].Producttype = Producttypes.Producttype; -- Facts do not cease to exist because they are ignored. "Gina Whipp" wrote: Sibbel, We can't see what you are doing so it will help if you post the SQL of your query here... To do this you need to go to design view of your query and in the upper left hand corner select 'SQL' from the tiny drop down arrow there. Then copy/paste the code that shows in that window. -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Sibbel" wrote in message news I am pretty new with Acces and I am running into a problem. I have made a form witch I have set the record sourde on a query I made. I have build some formulas in it and the work very well. When I open the query in the datasheet view all the results are shwon. On the form they all work, except for one. The text box stays empty. This is the only formula that uses data from another table compared to the others. What have I done wrong. Please help. Greetings Sibbel -- Facts do not cease to exist because they are ignored. |
#12
|
|||
|
|||
Query and form
Hi Gina,
My colleague has helped me with the problem. There was something wrong with the relationships and something with putting data from the form into the tblDatabase. Thank you very much for your tips and help. I really appreciate it. Gr Sibbel -- Facts do not cease to exist because they are ignored. "Gina Whipp" wrote: Sibbel, Do you have an empty version of the database you can send to me? From what I can see it should work which means I am missing something. If it shows in the query it should show on the form with no issues, so something else is going on. -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Sibbel" wrote in message ... Hi Gina I'm affraid that didn't work. I'll try to explain another problem, which I think has the same root cause. I have made the form wich has that query (qryTotaalUren) as Record source. This query contains two tables (tblDatabase and Producttypes). All the fields that will be filled in the form will be put into the tblDatabase. These fields are also shown in the query. But when I want to show data on the form from the other table (Producttypes) all the text boxes stay empty. But they are in the query when I open it in datasheet view. For example I want to show "Maximum snelheid" (from the table Producttypes) on the form wich depends on wich "producttype" is filled in. the table tblDatabase contains amongst other things the following fields: ID Datum Ploeg Pers Producttype ProductID the table Producttypes contains amongst other things the following fields: ProductID Producttype Maximum snelheid Normtijd omstellen I have made a relation between ProductID. Do I want the impossible or is there something I have missed? Gr Sibbel -- Facts do not cease to exist because they are ignored. "Gina Whipp" wrote: Sibbel, Change the field name to txtPG. Having the field name and the field source AND using the the that name in the function confuses Access. As for the relationship I would have to see the tables and their relationships to know. However, if the other fields work then I'm going to say they are probably okay. -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Sibbel" wrote in message ... Gina, The table is part of the query. I have run a little test and put another field of that table on the form ([maximum snelheid]), this one also stays blank. The field name is PG and the control source is also PG. Could it be that I have made a "wrong" relation between the two tables that have [producttype] as a common field? [Maximum snelheid] depends on wich [producttype] is choosen on the form and PG uses this [maximum snelheid] to calculate the answer. Greetz Sibbel -- Facts do not cease to exist because they are ignored. "Gina Whipp" wrote: Sibbel, When you say another table, in regards to PG, does that mean the table is NOT part of the query? Also, if PG does in fact show in the query but not in the subform, what is the field name on the form and what is the control source of that field? -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Sibbel" wrote in message ... Gina, That is indeed the part that does not show on the form. When I open this query in datasheet view everything works fine, all the calculations/formulas give the right answer. But when I open my form PG doesn't show any result. The text box stays empty while the others (BG and KG) work immediatly when you enter some data. BG and KG only use data from one table. PG also uses [Maximum snelheid] wich comes from an other table. Gr Sibbel -- Facts do not cease to exist because they are ignored. "Gina Whipp" wrote: Sibbel, Is this the part that does not show? And which field is not in the table that is included in the query? Format(IIf([BG]=" "," ",IIf([Productie]=0," ",(([Aantal geperst]+[Uitval])/([Productie]*60*[Maximum snelheid])))),"#,##0.00") AS PG -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Sibbel" wrote in message ... I'm sorry (Like I said I am new at this) ;-) It's the formula I wrote for "PG" that doesn't show on the form. I hope I have the right thing: SELECT [Tbl Database].Datum, [Tbl Database].Dienst, [Tbl Database].Ploeg, [Tbl Database].Pers, [Tbl Database].Producttype, Producttypes.[Maximum snelheid], [Tbl Database].[Actuele snelheid], [Tbl Database].[Aantal geperst], [Tbl Database].Uitval, [Tbl Database].Productie, [Tbl Database].Omstellen, [Tbl Database].Gereedschapswissel, [Tbl Database].[Geen bediening], [Tbl Database].Proefpersen, [Tbl Database].[Wachten op gereedschap], [Tbl Database].[Wachten op order], [Tbl Database].[Wachten op materiaal], [Tbl Database].Storing, [Tbl Database].Reparatie, [Tbl Database].Uitgepland, [Tbl Database].Opmerkingen, [Tbl Database].[SAP ordernummer], [Tbl Database]!Productie+[Tbl Database]!Omstellen+[Tbl Database]!Gereedschapswissel+[Tbl Database]![Geen bediening]+[Tbl Database]!Proefpersen+[Tbl Database]![Wachten op gereedschap]+[Tbl Database]![Wachten op order]+[Tbl Database]![Wachten op materiaal]+[Tbl Database]!Storing+[Tbl Database]!Reparatie+[Tbl Database]!Uitgepland AS TotaalUren, Format(IIf([TotaalUren]-[Uitgepland]=0," ",[Productie]/([TotaalUren]-[Uitgepland])),"#,##0.00") AS BG, Format(IIf([BG]=" "," ",IIf([Productie]=0," ",(([Aantal geperst]+[Uitval])/([Productie]*60*[Maximum snelheid])))),"#,##0.00") AS PG, Format(IIf([BG]=" "," ",IIf([Aantal geperst]+[Uitval]=0," ",([Aantal geperst]/([Aantal geperst]+[Uitval])))),"#,##0.00") AS KG, Format(IIf([BG]=" "," ",IIf([BG]=0,0,[BG]*[PG]*[KG]*100)),"#,#0.0") AS OEE, ([Aantal geperst]+[Uitval])/([Productie]*60*[Maximum snelheid]) AS [PG test] FROM [Tbl Database] LEFT JOIN Producttypes ON [Tbl Database].Producttype = Producttypes.Producttype; -- Facts do not cease to exist because they are ignored. "Gina Whipp" wrote: Sibbel, We can't see what you are doing so it will help if you post the SQL of your query here... To do this you need to go to design view of your query and in the upper left hand corner select 'SQL' from the tiny drop down arrow there. Then copy/paste the code that shows in that window. -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Sibbel" wrote in message news I am pretty new with Acces and I am running into a problem. I have made a form witch I have set the record sourde on a query I made. I have build some formulas in it and the work very well. When I open the query in the datasheet view all the results are shwon. On the form they all work, except for one. The text box stays empty. This is the only formula that uses data from another table compared to the others. What have I done wrong. Please help. Greetings Sibbel -- |
#13
|
|||
|
|||
Query and form
Sibbel,
I'm glad you got a solution and thank you posting back. -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Sibbel" wrote in message ... Hi Gina, My colleague has helped me with the problem. There was something wrong with the relationships and something with putting data from the form into the tblDatabase. Thank you very much for your tips and help. I really appreciate it. Gr Sibbel -- Facts do not cease to exist because they are ignored. "Gina Whipp" wrote: Sibbel, Do you have an empty version of the database you can send to me? From what I can see it should work which means I am missing something. If it shows in the query it should show on the form with no issues, so something else is going on. -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Sibbel" wrote in message ... Hi Gina I'm affraid that didn't work. I'll try to explain another problem, which I think has the same root cause. I have made the form wich has that query (qryTotaalUren) as Record source. This query contains two tables (tblDatabase and Producttypes). All the fields that will be filled in the form will be put into the tblDatabase. These fields are also shown in the query. But when I want to show data on the form from the other table (Producttypes) all the text boxes stay empty. But they are in the query when I open it in datasheet view. For example I want to show "Maximum snelheid" (from the table Producttypes) on the form wich depends on wich "producttype" is filled in. the table tblDatabase contains amongst other things the following fields: ID Datum Ploeg Pers Producttype ProductID the table Producttypes contains amongst other things the following fields: ProductID Producttype Maximum snelheid Normtijd omstellen I have made a relation between ProductID. Do I want the impossible or is there something I have missed? Gr Sibbel -- Facts do not cease to exist because they are ignored. "Gina Whipp" wrote: Sibbel, Change the field name to txtPG. Having the field name and the field source AND using the the that name in the function confuses Access. As for the relationship I would have to see the tables and their relationships to know. However, if the other fields work then I'm going to say they are probably okay. -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Sibbel" wrote in message ... Gina, The table is part of the query. I have run a little test and put another field of that table on the form ([maximum snelheid]), this one also stays blank. The field name is PG and the control source is also PG. Could it be that I have made a "wrong" relation between the two tables that have [producttype] as a common field? [Maximum snelheid] depends on wich [producttype] is choosen on the form and PG uses this [maximum snelheid] to calculate the answer. Greetz Sibbel -- Facts do not cease to exist because they are ignored. "Gina Whipp" wrote: Sibbel, When you say another table, in regards to PG, does that mean the table is NOT part of the query? Also, if PG does in fact show in the query but not in the subform, what is the field name on the form and what is the control source of that field? -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Sibbel" wrote in message ... Gina, That is indeed the part that does not show on the form. When I open this query in datasheet view everything works fine, all the calculations/formulas give the right answer. But when I open my form PG doesn't show any result. The text box stays empty while the others (BG and KG) work immediatly when you enter some data. BG and KG only use data from one table. PG also uses [Maximum snelheid] wich comes from an other table. Gr Sibbel -- Facts do not cease to exist because they are ignored. "Gina Whipp" wrote: Sibbel, Is this the part that does not show? And which field is not in the table that is included in the query? Format(IIf([BG]=" "," ",IIf([Productie]=0," ",(([Aantal geperst]+[Uitval])/([Productie]*60*[Maximum snelheid])))),"#,##0.00") AS PG -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Sibbel" wrote in message ... I'm sorry (Like I said I am new at this) ;-) It's the formula I wrote for "PG" that doesn't show on the form. I hope I have the right thing: SELECT [Tbl Database].Datum, [Tbl Database].Dienst, [Tbl Database].Ploeg, [Tbl Database].Pers, [Tbl Database].Producttype, Producttypes.[Maximum snelheid], [Tbl Database].[Actuele snelheid], [Tbl Database].[Aantal geperst], [Tbl Database].Uitval, [Tbl Database].Productie, [Tbl Database].Omstellen, [Tbl Database].Gereedschapswissel, [Tbl Database].[Geen bediening], [Tbl Database].Proefpersen, [Tbl Database].[Wachten op gereedschap], [Tbl Database].[Wachten op order], [Tbl Database].[Wachten op materiaal], [Tbl Database].Storing, [Tbl Database].Reparatie, [Tbl Database].Uitgepland, [Tbl Database].Opmerkingen, [Tbl Database].[SAP ordernummer], [Tbl Database]!Productie+[Tbl Database]!Omstellen+[Tbl Database]!Gereedschapswissel+[Tbl Database]![Geen bediening]+[Tbl Database]!Proefpersen+[Tbl Database]![Wachten op gereedschap]+[Tbl Database]![Wachten op order]+[Tbl Database]![Wachten op materiaal]+[Tbl Database]!Storing+[Tbl Database]!Reparatie+[Tbl Database]!Uitgepland AS TotaalUren, Format(IIf([TotaalUren]-[Uitgepland]=0," ",[Productie]/([TotaalUren]-[Uitgepland])),"#,##0.00") AS BG, Format(IIf([BG]=" "," ",IIf([Productie]=0," ",(([Aantal geperst]+[Uitval])/([Productie]*60*[Maximum snelheid])))),"#,##0.00") AS PG, Format(IIf([BG]=" "," ",IIf([Aantal geperst]+[Uitval]=0," ",([Aantal geperst]/([Aantal geperst]+[Uitval])))),"#,##0.00") AS KG, Format(IIf([BG]=" "," ",IIf([BG]=0,0,[BG]*[PG]*[KG]*100)),"#,#0.0") AS OEE, ([Aantal geperst]+[Uitval])/([Productie]*60*[Maximum snelheid]) AS [PG test] FROM [Tbl Database] LEFT JOIN Producttypes ON [Tbl Database].Producttype = Producttypes.Producttype; -- Facts do not cease to exist because they are ignored. "Gina Whipp" wrote: Sibbel, We can't see what you are doing so it will help if you post the SQL of your query here... To do this you need to go to design view of your query and in the upper left hand corner select 'SQL' from the tiny drop down arrow there. Then copy/paste the code that shows in that window. -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "Sibbel" wrote in message news I am pretty new with Acces and I am running into a problem. I have made a form witch I have set the record sourde on a query I made. I have build some formulas in it and the work very well. When I open the query in the datasheet view all the results are shwon. On the form they all work, except for one. The text box stays empty. This is the only formula that uses data from another table compared to the others. What have I done wrong. Please help. Greetings Sibbel -- |
|
Thread Tools | |
Display Modes | |
|
|