20. december 2001 - 11:05Der er
11 kommentarer og 1 løsning
Reset formular
Jeg har en formular hvor der er 5 combobokse. disse 5 combobokse refererer til hver deres forespørgsel. eks.: query 1 er baseret på en hovedtabel. query 2 er baseret på query 1 query 3 er baseret på query 2
nu ønsker jeg at nulstille alle mine queryes med en VBA kommando via en knap. JEg har prøvet med : combo1.value = \"\" osv. og også docmd.showallrecords docmd.requery docmd.repaint
men lige lidt hjælper det. Det virker såfremt jeg lukker og ånber formen men dette er dog lidt omsonst..
Efter ti år i London, Madrid, Paris og Utrecht kommer Sabios AI-fokuserede program af arrangementer om kundeoplevelser, ‘Disrupt’, for første gang til Danmark.
I need to know what you wnat to do? (nulstil) means somthing in th eregion of Empty, is that what you want? If so then you need to alter the combo\'s row source to sometyhing which returns NO values.
Når jeg kører mit script \"sætter\" jeg værdierne i de respektive kombobokse til \"null\". Men de forespørgsler der har et kriterie der er afhængig af værdierne i disse kombobokse bliver ligesom hængende med de værdier man havde valgt inden jeg satte comboerne til \"null\".
Det jeg ønsker er altså at resette mine queryes uden at skulle lukke og genåbne min form.
When you say \"sætter\" kombobokse to \"null\" do you mean that you empty the text field part of the combo box, the list part still contains data deosnt it?
You say \"Nulstile\" your queries. Are your queries made dynamically? (when you choose values form the combo\'s you build the query) Or do they just refer to the combo boxes?
If you build the queries dynamically then you need to build them again when the combo boxes (entry field) are emptied. Otherwise I would have thought that Me.requery after null stilling the text boxes would work.
Try NOT using theCombo.value = \"\" but Me.theCombo = \"\"
When you say \"sætter\" kombobokse to \"null\" do you mean that you empty the text field part of the combo box, the list part still contains data deosnt it? :
yes. Text is being emty, list value still exist. I want to emty this list value also.
You say \"Nulstile\" your queries. Are your queries made dynamically? (when you choose values form the combo\'s you build the query) Or do they just refer to the combo boxes? :
the just refer to the combo. Eg :in the criteria field of query1 the criteria is as follows.:
[Forms]![F_classifikation]![Solar Group System]
About your last comment.:
I will try to set the followings in the script to see if that works :
Private Sub Command145_Click() Me.Solar_Group_System.Value = \"\" Me.Product_Line.Value = \"\" Me.Product_Sector.Value = \"\" Me.Product_Group.Value = \"\" Me.Item_Group.Value = \"\" Me.Famely_name.Value = \"\" Me.Requery End Sub
The list of value from the recent choice is not disapearing.... shit også...!!!!!
It is the me.requery that i think is the problem... it wont \"set\" the queryes to \"null\" in the criteria i guess... ( the previus list of choice is not being \"reset\")
If you want to empty the list values, then you have to alter the RowSource and RowSourceType.
This is taken from Access help, but emptying may give problems, why do you wnat to empty it?
The following example sets the RowSourceType property for a combo box to Table/Query, and it sets the RowSource property to a query named EmployeeList.
Nå, Me.YourCombo.Rowsource = \"\" er ikke en god løsning da denne resetter min kilde fr min comboboks. Grunden til jeg vil resette denne er såfremt man kommer ti at lave et forkert valg i en boks skal man starte forfra igen og det kan man kun vet at lukke og åbne formularen.
Been to England for the New Year, just got back today. Dont know what to suggest then, sorry!
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.