P
pretzel
Hi, I know this is possible, but have come to a dead end on all I've tried. I
have read all I could find on this site as well as on-line help.
I'm creating a db for my Swim Club which holds Times for members for up to
39 possible combinations of distance and stroke. I'm storing the Time info as
two separate fields (Min & Sec) and having it display in a form using
expressions like =[sc50mB/Fly-m] & ":" & [sc50mB/Fly-s] in the Control for
the TextBox on the form, so far so good.
Times can not be edited directly on the form (which in a way is a good
thing), so I can create a button for each of the 39 possabilities to open an
edit form, to edit the two fields. I have tested using a separate "Edit Form"
for each button which works, but is a lot of forms(39!!). I'd rather so
something smarter (more efficient) and use one Edit Form (EditSwimTime), and
then pass information from each of the 39 buttons to the EditSwimTime Form.
I've created a separate module with code like:
Global strCourse As String, strLS As String, strDist As String, strStroke As
String
Function GetCourse() As String
GetCourse = strCourse
End Function
From here I can display GetCourse in a Control for a TextBox on the
EditSwimTime form and this works great.
What I can't do is pass the information to the form of the time I want to
display (times are held in a table). To display the value of minutes, I have
tried using;
Function GetMinTime() As String
GetMinTime = strLS + strDist + strStroke + "-m"
End Function
And then placed =GetMinTime() in a Control for appropriate TextBox on
EditSwimTime. Unfortuanately, it just displays the "sc50mB/Fly-m" rather than
returning the value of the minutes field in the table (called ShortCourse).
If I use =[GetMinTime()] then I get "#Name?" in my TextBox.
Any ideas?
have read all I could find on this site as well as on-line help.
I'm creating a db for my Swim Club which holds Times for members for up to
39 possible combinations of distance and stroke. I'm storing the Time info as
two separate fields (Min & Sec) and having it display in a form using
expressions like =[sc50mB/Fly-m] & ":" & [sc50mB/Fly-s] in the Control for
the TextBox on the form, so far so good.
Times can not be edited directly on the form (which in a way is a good
thing), so I can create a button for each of the 39 possabilities to open an
edit form, to edit the two fields. I have tested using a separate "Edit Form"
for each button which works, but is a lot of forms(39!!). I'd rather so
something smarter (more efficient) and use one Edit Form (EditSwimTime), and
then pass information from each of the 39 buttons to the EditSwimTime Form.
I've created a separate module with code like:
Global strCourse As String, strLS As String, strDist As String, strStroke As
String
Function GetCourse() As String
GetCourse = strCourse
End Function
From here I can display GetCourse in a Control for a TextBox on the
EditSwimTime form and this works great.
What I can't do is pass the information to the form of the time I want to
display (times are held in a table). To display the value of minutes, I have
tried using;
Function GetMinTime() As String
GetMinTime = strLS + strDist + strStroke + "-m"
End Function
And then placed =GetMinTime() in a Control for appropriate TextBox on
EditSwimTime. Unfortuanately, it just displays the "sc50mB/Fly-m" rather than
returning the value of the minutes field in the table (called ShortCourse).
If I use =[GetMinTime()] then I get "#Name?" in my TextBox.
Any ideas?