I am trying to position a text box on a report using the Left, Top etc properties.
In the form which opens this Report are some text box fields which contain the position value.
Even though the button calling the report is on the form, it errors saying ' Microsoft Access cannot find the referenced form. Here is the code:
Private Sub Cmd_Open_Rep_Click()
Dim strWhere As String 'The criteria string.
DoCmd.OpenReport "Rep_Port_Grt", acViewPreview, acDialog, strWhere
Me!Text1.Height = Forms![Frm_Card_Parms]![Ht_Sz]
Me!Text1.Width = Forms![Frm_Card_Parms]![Wth_Sz]
Me!Text1.Left = Forms![Frm_Card_Parms]![Lft_Posn]
Me!Text1.Top = Forms![Frm_Card_Parms]![Top_Dim]
End Sub
Where am going wrong?
Also, I want to use some text that I have selected in a previous form which has been selected from an SQL query:
SELECT Verses.VerseID, Verses.EventID, Verses.MoodID, Verses.Verse, Events.EventID, Events.Event_Type, Moods.MoodID, Moods.Mood_Type, Verses.Tick_Box
FROM Moods INNER JOIN (Events INNER JOIN Verses ON Events.EventID = Verses.EventID) ON Moods.MoodID = Verses.MoodID
WHERE (((Events.Event_Type) Like fCboSearch([Forms]![Frm_Verse_Cbo]![cbo_Evt])) AND ((Moods.Mood_Type) Like fCboSearch([Forms]![Frm_Verse_Cbo]![Cbo_Md])))
ORDER BY Verses.VerseID;
How do I get that to be written into the text box?
In the form which opens this Report are some text box fields which contain the position value.
Even though the button calling the report is on the form, it errors saying ' Microsoft Access cannot find the referenced form. Here is the code:
Private Sub Cmd_Open_Rep_Click()
Dim strWhere As String 'The criteria string.
DoCmd.OpenReport "Rep_Port_Grt", acViewPreview, acDialog, strWhere
Me!Text1.Height = Forms![Frm_Card_Parms]![Ht_Sz]
Me!Text1.Width = Forms![Frm_Card_Parms]![Wth_Sz]
Me!Text1.Left = Forms![Frm_Card_Parms]![Lft_Posn]
Me!Text1.Top = Forms![Frm_Card_Parms]![Top_Dim]
End Sub
Where am going wrong?
Also, I want to use some text that I have selected in a previous form which has been selected from an SQL query:
SELECT Verses.VerseID, Verses.EventID, Verses.MoodID, Verses.Verse, Events.EventID, Events.Event_Type, Moods.MoodID, Moods.Mood_Type, Verses.Tick_Box
FROM Moods INNER JOIN (Events INNER JOIN Verses ON Events.EventID = Verses.EventID) ON Moods.MoodID = Verses.MoodID
WHERE (((Events.Event_Type) Like fCboSearch([Forms]![Frm_Verse_Cbo]![cbo_Evt])) AND ((Moods.Mood_Type) Like fCboSearch([Forms]![Frm_Verse_Cbo]![Cbo_Md])))
ORDER BY Verses.VerseID;
How do I get that to be written into the text box?