G
Gavpav
Hi, further to a message a few days ago:
I have worked on the sugesstions mentioned, and found that
probably the only method is by VBA, i have tried my hand
at this, and managed to come up with this...
Public Sub openemail_Click()
If Forms![group-members]![id-tag] = "1" Then
Forms![frmEmailReport]![1stMailTo].RowSource = "SELECT
DISTINCTROW [mancom-email]., [mancom-email].[Second
Name], [mancom-email].[First Name] FROM [mancom-email];"
ElseIf Forms![group-members]![id-tag] = "2" Then
Forms![frmEmailReport]![1stMailTo].RowSource = "SELECT
DISTINCTROW [gencom-email].[Email], [gencom-email].[Second
Name], [gencom-email].[First Name] FROM [gencom-email];"
ElseIf Forms![group-members]![id-tag] = "3" Then
Forms![frmEmailReport]![1stMailTo].RowSource = "SELECT
DISTINCTROW [clubsec-email].[Email], [clubsec-email].
[Second Name], [clubsec-email].[First Name] FROM [clubsec-
email];"
ElseIf Forms![group-members]![id-tag] = "4" Then
Forms![frmEmailReport]![1stMailTo].RowSource = "SELECT
DISTINCTROW [clubrep-email].[Email], [clubrep-email].
[Second Name], [clubrep-email].[First Name] FROM [clubrep-
email];"
ElseIf Forms![group-members]![id-tag] = "5" Then
Forms![frmEmailReport]![1stMailTo].RowSource = "SELECT
DISTINCTROW [pastpres-email].[Email], [pastpres-email].
[Second Name], [pastpres-email].[First Name] FROM
[pastpres-email];"
ElseIf Forms![group-members]![id-tag] = "5" Then
Forms![frmEmailReport]![1stMailTo].RowSource = "SELECT
DISTINCTROW [fullsend-email].[Email], [fullsend-email].
[Second Name], [fullsend-email].[First Name] FROM
[fullsend-email];"
End If
End Sub
i dont have a clue if it is correct or not, but i cant
seem to get it to work, i would be very grateful if
someone could check it over...
Thanks Gavin
hi, i have a form that is not attached to any data, on it
is a listbox. I need to be able to change the rowsource
property of this listbox when i open the form depending on
a value in a field on another form.
I am not too sure of VB, and have tried to do this using
macro's but to no avail. Any help would be much
appreciated.
I have worked on the sugesstions mentioned, and found that
probably the only method is by VBA, i have tried my hand
at this, and managed to come up with this...
Public Sub openemail_Click()
If Forms![group-members]![id-tag] = "1" Then
Forms![frmEmailReport]![1stMailTo].RowSource = "SELECT
DISTINCTROW [mancom-email]., [mancom-email].[Second
Name], [mancom-email].[First Name] FROM [mancom-email];"
ElseIf Forms![group-members]![id-tag] = "2" Then
Forms![frmEmailReport]![1stMailTo].RowSource = "SELECT
DISTINCTROW [gencom-email].[Email], [gencom-email].[Second
Name], [gencom-email].[First Name] FROM [gencom-email];"
ElseIf Forms![group-members]![id-tag] = "3" Then
Forms![frmEmailReport]![1stMailTo].RowSource = "SELECT
DISTINCTROW [clubsec-email].[Email], [clubsec-email].
[Second Name], [clubsec-email].[First Name] FROM [clubsec-
email];"
ElseIf Forms![group-members]![id-tag] = "4" Then
Forms![frmEmailReport]![1stMailTo].RowSource = "SELECT
DISTINCTROW [clubrep-email].[Email], [clubrep-email].
[Second Name], [clubrep-email].[First Name] FROM [clubrep-
email];"
ElseIf Forms![group-members]![id-tag] = "5" Then
Forms![frmEmailReport]![1stMailTo].RowSource = "SELECT
DISTINCTROW [pastpres-email].[Email], [pastpres-email].
[Second Name], [pastpres-email].[First Name] FROM
[pastpres-email];"
ElseIf Forms![group-members]![id-tag] = "5" Then
Forms![frmEmailReport]![1stMailTo].RowSource = "SELECT
DISTINCTROW [fullsend-email].[Email], [fullsend-email].
[Second Name], [fullsend-email].[First Name] FROM
[fullsend-email];"
End If
End Sub
i dont have a clue if it is correct or not, but i cant
seem to get it to work, i would be very grateful if
someone could check it over...
Thanks Gavin