N
Niklas Östergren
Hi!
I´m having a small problem with an unbound QBF form.
I´d like to populate it with the last selected value´s in each
textbox/combobox so the user don´t have to fill in all data everytime he/she
open up the form.
I have already solved how to store the values in "tblStorage" But not how to
populate the form again with the values stored in "tblStorage".
Offcourse is every control in this form unbound and I know that I can use
DLookUp to get tge values but I also know that DLookUo isn´t very fast so
I´d like to know if ther´s another way?
I have tried with "Seek" but I don´t know how to fill the control with the
value with this methode.
I have trued with the code below but since the form doesn´t have any
recordsource I get an error.
TIA!
// Niklas
Code I have tried:
rst.Seek "=", "CriteriaMemberShipType"
' If a match, get the membership type ID and set value in
cboMemberShipType
' record. If no match, do nothing.
If Not rst.NoMatch Then
If Not IsNull(rst![Value]) Then
' Create clone of the form's record set.
Set rstFrm = Me.RecordsetClone
' Find the matching record.
rstFrm.FindFirst "[CriteriaMemberShipType] = " & rst![Value]
Me.cboMemberShipType = rst![Value]
rstFrm.Close ' Close the recordset rstFrm.
End If
End If
====================================================
I´m having a small problem with an unbound QBF form.
I´d like to populate it with the last selected value´s in each
textbox/combobox so the user don´t have to fill in all data everytime he/she
open up the form.
I have already solved how to store the values in "tblStorage" But not how to
populate the form again with the values stored in "tblStorage".
Offcourse is every control in this form unbound and I know that I can use
DLookUp to get tge values but I also know that DLookUo isn´t very fast so
I´d like to know if ther´s another way?
I have tried with "Seek" but I don´t know how to fill the control with the
value with this methode.
I have trued with the code below but since the form doesn´t have any
recordsource I get an error.
TIA!
// Niklas
Code I have tried:
rst.Seek "=", "CriteriaMemberShipType"
' If a match, get the membership type ID and set value in
cboMemberShipType
' record. If no match, do nothing.
If Not rst.NoMatch Then
If Not IsNull(rst![Value]) Then
' Create clone of the form's record set.
Set rstFrm = Me.RecordsetClone
' Find the matching record.
rstFrm.FindFirst "[CriteriaMemberShipType] = " & rst![Value]
Me.cboMemberShipType = rst![Value]
rstFrm.Close ' Close the recordset rstFrm.
End If
End If
====================================================