Atomate MSAccess 2003

  • Thread starter Thread starter Barry G. Sumpter
  • Start date Start date
B

Barry G. Sumpter

This is the article I've based a report viewer on:

http://support.microsoft.com/?id=210132

I've been able to execute 2003 reports but can't seem to figure an
appropriate way to show
the reports selection criteria from either the filter or where clause.

Does anyone know how to execute a report with a filter or where clause
AND show the selection criteria (filter or where clause that report was
based on) on the report?

----

I'm also getting all kinds of security pop ups - expecially when I run the
the RunTime Only.

Does anyone know if the security pop ups occur whith a MSAccess 2003 app.
(instead of an .mdb).

Thanks,
Barry G. Sumpter
 
You would probably be better off posting this to the Access newsgroups
really.

Regards - OHM
 
Barry said:
This is the article I've based a report viewer on:

http://support.microsoft.com/?id=210132

I've been able to execute 2003 reports but can't seem to figure an
appropriate way to show
the reports selection criteria from either the filter or where clause.

Does anyone know how to execute a report with a filter or where clause
AND show the selection criteria (filter or where clause that report was
based on) on the report?


Excessive crossposts trimmed.

How you display the criteria used to filter the report's
data depends on where the criteria is specified.

If the report's record source query uses prompt strings to
get the criteria, then all you need to do is use the prompt
strings in an expression in a text box in the report header.
For example:
="Orders from " & [Start Date] & " to " & [End Date]

If the query's criteria are references to form controls then
the report can display the same values:
="Orders from " & Forms!theform.txtStartDate & " to " &
Forms!theform.txtEndDate

If that's not what you're doing, then you'll have to explain
so I don't have to keep guessing about it.
 
Yep, exactly where I'm heading.

Making heaps of headway at the moment.

Except for a small snag.

This is probably an easy questions so all you MVPs and OHMs shouldn't waste
your time on this one.

Hi all,

As Marshall replied:
="Orders from " & Forms!theform.txtStartDate & " to " &
Forms!theform.txtEndDate

Whats the secret to the combobox.text as in:
Forms!theform.txtmyCbo
it only returns the bound column data
Id like to return just the text but I get the Error

Forms!theform.txtmyCbo.text doesn't work
Forms!theform.txtmyCbo(1).text doesn't work

Any help would be appreciated.

Thanks,
Barry G. Sumpter

P.S. I've forgotten how great MSAccess is ..... ;)

P.S.S. This topic I've found under QBF (Query by Form)
Since I hadn't hear of QBF before it shows how long I;ve
been away from MSAccess formas and reports Development


Marshall Barton said:
Barry said:
This is the article I've based a report viewer on:

http://support.microsoft.com/?id=210132

I've been able to execute 2003 reports but can't seem to figure an
appropriate way to show
the reports selection criteria from either the filter or where clause.

Does anyone know how to execute a report with a filter or where clause
AND show the selection criteria (filter or where clause that report was
based on) on the report?


Excessive crossposts trimmed.

How you display the criteria used to filter the report's
data depends on where the criteria is specified.

If the report's record source query uses prompt strings to
get the criteria, then all you need to do is use the prompt
strings in an expression in a text box in the report header.
For example:
="Orders from " & [Start Date] & " to " & [End Date]

If the query's criteria are references to form controls then
the report can display the same values:
="Orders from " & Forms!theform.txtStartDate & " to " &
Forms!theform.txtEndDate

If that's not what you're doing, then you'll have to explain
so I don't have to keep guessing about it.
 
Barry said:
Whats the secret to the combobox.text as in:
Forms!theform.txtmyCbo
it only returns the bound column data
Id like to return just the text but I get the Error


Use the Column property (zero based) to get values othern
than the bound column:

Forms!theform.txtmyCbo.Column(1)

Not sure about the 1.
 
Yeah I tried that before but just tried again and I'm getting the
#Name?

I looked thru the expression builder and Column or columns are NOT
available.

I just tried a work around where I've put an extra txt field on the same
form and reference the txt field in my report instead of the combobox
(I feel like such a hack with this code.)
Although it works I don't know why I have to do it this way anymore... I've
forgotten

Again, I'm thinking its because Access is such a great product I can
continue to progross so well...

Private Sub cboUser_Change()

Dim str As String
str = cboUser.Text

txtUserName.SetFocus
txtUserName.Text = str
cboUser.SetFocus

End Sub

Any further constructive suggestions would be greatly appreciaed!

Thanks again,

baz
 
Comments inline below.
--
Marsh
MVP [MS Access]

Yeah I tried that before but just tried again and I'm getting the
#Name?

That implies that you do not have a combo box control named
txtmyCbo. Your code below uses the name cboUser.

I looked thru the expression builder and Column or columns are NOT
available.

You have to use the name of the combo box. The only other
control that has the Column property is a list box.

I just tried a work around where I've put an extra txt field on the same
form and reference the txt field in my report instead of the combobox
(I feel like such a hack with this code.)
Although it works I don't know why I have to do it this way anymore... I've
forgotten

You don't have to su it this way.

Again, I'm thinking its because Access is such a great product I can
continue to progross so well...

Private Sub cboUser_Change()

Dim str As String
str = cboUser.Text

txtUserName.SetFocus
txtUserName.Text = str
cboUser.SetFocus

End Sub

That's a bit of overkill, don't forget that the Change event
fires on every keystroke. If you can't unravel the use of
the Column property, then at least use the AfterUpdate event
for your "workaround".

 
Thanks for the effort and patience here Marshall.

I was using the .text property on all my references.

Once I romved the .text then MSAccess works as I would expect VB to work
with the .text.

all the best

baz


Marshall Barton said:
Comments inline below.
--
Marsh
MVP [MS Access]

Yeah I tried that before but just tried again and I'm getting the
#Name?

That implies that you do not have a combo box control named
txtmyCbo. Your code below uses the name cboUser.

I looked thru the expression builder and Column or columns are NOT
available.

You have to use the name of the combo box. The only other
control that has the Column property is a list box.

I just tried a work around where I've put an extra txt field on the same
form and reference the txt field in my report instead of the combobox
(I feel like such a hack with this code.)
Although it works I don't know why I have to do it this way anymore... I've
forgotten

You don't have to su it this way.

Again, I'm thinking its because Access is such a great product I can
continue to progross so well...

Private Sub cboUser_Change()

Dim str As String
str = cboUser.Text

txtUserName.SetFocus
txtUserName.Text = str
cboUser.SetFocus

End Sub

That's a bit of overkill, don't forget that the Change event
fires on every keystroke. If you can't unravel the use of
the Column property, then at least use the AfterUpdate event
for your "workaround".

 
Back
Top