18. februar 2003 - 15:24Der er
12 kommentarer og 1 løsning
Kombinationsbokse - opdatering
Jeg har en formular hvor jeg har nogle ubundne kombinationsbokse. Rækkekilden er baseret på et SQL statement, samt en standardværdi. På samme formular har jeg en knap som går til Ny-post, mit problem er at de ubundne kombinationsbokse ”husker” indstillingen fra forrige post, dvs jeg får ikke samme layout som når jeg åbner formularen første gang – hvad gør jeg for at bringe kombinationsboksene tilbage til udgangspunktet når jeg åbner en ny post.
Der bliver investeret massivt i AI. Teknologien er mere tilgængelig end nogensinde, og ambitionerne er høje. Alligevel oplever mange virksomheder, at resultaterne udebliver.
Not quite sure what you are saying here! What are you expecting to see in the combo box if it is unbound? If you want it to show an empty field then try changing it to a BOUND field an dit will do it for you. What is the purpose of having a combo where you can choose values from if they are not to be used in the record but STILL show what you have chosen?
If you want it to be blank on new record then Me.Combo = Null may do the trick
Min combobox bruges som kriterie i et af mine bundne felter på min formular, derfor skal den starte på en frisk hver gang jeg skal tilføje en ny post. Jeg har prøvet nedenstående (Ny post knap), dog uden held da kommer en fejlmeddelelse som siger at Table variabel ikke er erklæret.
Private Sub Kommandoknap67_Click() On Error GoTo Err_Kommandoknap67_Click
still do noy know what your trying to do "derfor skal den starte på en frisk hver gang jeg skal tilføje en ny post"
THIS isnt going to change anything! Me.Hovedgruppevalg.RowSource = "SELECT DISTINCT [Hoved_Undergruppe].[Hovedgruppe] FROM Hoved_Undergruppe;" It only selects the same record as before.
Do you have a table named Hoved_Undergruppe ???
Me.Hovedgruppevalg.requery should refresh the contents but if the Rowsource has not changed then it will not help things
Ja, jeg ved godt hvad jeg vil. Når jeg skal oprette en ny post skal min komboboks se ud som når jeg indlæser formularen første gang - og ikke stå på den værdi som blev valgt ved forrige post.
cuac>you dont say ANYTHING you havent said before!
You say that the combo box is UNBOUND and if that is the case then the combo box DOES NOT change when you move to another record OT a new record for that matter. So yes, you may know what your trying to do but without some more information we, or at least I do not!
You can send the dB to eksperten@santhell.dk and I will take a look, otherwise I think we could be here a LOoong time, and I dont have that long :o)
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.