Unbound form

  • Thread starter Thread starter MikeM
  • Start date Start date
M

MikeM

I am trying to create form using this coding and it works but I am only able
to show 1 record. How can I show this record(has a fldCurrentPeriod flag on
it.) on Load and then click through the rest of the records?

Private Sub Form_Load()
Dim rst As Recordset
' Dim varCurrPeriod As Variant

' trying to figure out how to open the form on the current period record.
' varCurrPeriod = DMax("YearPeriod", "tblInputTable", "[fldCurrentPeriod] =
True")
chkCurrentPeriod = False
chkCheckIEBV = False
txtYearPeriod = DMax("YearPeriod", "tblInputTable", "fldCurrentPeriod =
true")
txtIUSxrate = DMax("USDxrate", "tblInputTable", "fldCurrentPeriod = true")
txtIEUxrate = DMax("EUROxrate", "tblInputTable", "fldCurrentPeriod = true")
End Sub


Thanks,
MikeM
 
I'm not following what you are doing here? You say you want to show multiple
records, but your code is designed to return just one value for each field.
And you're not opening any type of recordset that could contain multiple
records. And, an obvious question is why do you need to use an unbound form;
likely what you want to display can be done more easily using a bound form
and a query as the form's recordsource.

You'll need to give more info about what you're doing so that we can help
identify a solution.
 
Back
Top