Form puzzlement


J

Jan :\)

Hi all :) Vista SP1, Access 2007

I am trying to create a form to display the results using a sort/filter
form, but, no matter which form format I choose, Tabular, Justified or
Columnar, all I get is the datasheet view. I have the form set for
Continuous Forms, but, it will only display in Datasheet view as an endless
run of records making it difficult to tell where one leaves off the the next
one starts. I have recreated the form several times using the various
formats, and all it will display in is the datasheet view.

Any suggestions of what I might look at for clues would be appreciated. I
have never had this problem before.

Jan :)
 
Ad

Advertisements

D

Dirk Goldgar

Jan :) said:
Hi all :) Vista SP1, Access 2007

I am trying to create a form to display the results using a sort/filter
form, but, no matter which form format I choose, Tabular, Justified or
Columnar, all I get is the datasheet view. I have the form set for
Continuous Forms, but, it will only display in Datasheet view as an
endless run of records making it difficult to tell where one leaves off
the the next one starts. I have recreated the form several times using
the various formats, and all it will display in is the datasheet view.

Any suggestions of what I might look at for clues would be appreciated. I
have never had this problem before.


Hi, Jan -

How are you opening this form? Directly, by double-clicking it in the Nav
Pane? Or are you opening it by code, maybe from a switchboard? If you're
opening it by code, is it possible that the code is explicitly opening it in
datasheet view, by using the acFormDS argument?
 
J

Jan :\)

Dirk Goldgar said:
Hi, Jan -

How are you opening this form? Directly, by double-clicking it in the Nav
Pane? Or are you opening it by code, maybe from a switchboard? If you're
opening it by code, is it possible that the code is explicitly opening it
in datasheet view, by using the acFormDS argument?

Hi Dirk! :)

I am opening via a filter form which has combo boxes from which I make a
selection of the name of the medication records that I want to view, and
then click on the related command button to open the form and display the
records in the display form. Here is the code behind that button:
~~~~~~~~~~~~~~~~~~~~~~
Private Sub cmdRxName_Click()
On Error GoTo Err_cmdRxName_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmMedsRec"

stLinkCriteria = "[RxName]=" & "'" & Me![cmbRxName] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_cmdRxName_Click:
Exit Sub

Err_cmdRxName_Click:
MsgBox Err.Description
Resume Exit_cmdRxName_Click
End Sub
~~~~~~~~~~~~~~~~~~~~
Even when in the form, if I select the Form View from the menu it will not
display in the form view, on only the datasheet view. I have recreated the
form several times to be sure it is set up correctly, it still will only
display in the datasheet view. I have other forms created in Access 2007
that display in the Form View, but, even using Tabular or Justified it will
only display in datasheet view. I have checked everything I can think of,
but, since I have not had the happen before I am not sure what else to
check.

Thank you for your time and help. :)

Jan :)
 
B

BruceM

I can't address the datasheet problem, but there is an extra quote in the
string (spaces added for clarity), assuming it is text:

stLinkCriteria = "[RxName] = " & ' " & Me![cmbRxName] & " ' "

If there are apostrophes in the value, substitute a pair of double quotes
for each single quote (apostrophe).

I'm not very familiar with Access 2007, but have you checked the Default
View property for the form (assuming it is still there in Access 2007)?

Jan :) said:
Dirk Goldgar said:
Hi, Jan -

How are you opening this form? Directly, by double-clicking it in the
Nav Pane? Or are you opening it by code, maybe from a switchboard? If
you're opening it by code, is it possible that the code is explicitly
opening it in datasheet view, by using the acFormDS argument?

Hi Dirk! :)

I am opening via a filter form which has combo boxes from which I make a
selection of the name of the medication records that I want to view, and
then click on the related command button to open the form and display the
records in the display form. Here is the code behind that button:
~~~~~~~~~~~~~~~~~~~~~~
Private Sub cmdRxName_Click()
On Error GoTo Err_cmdRxName_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmMedsRec"

stLinkCriteria = "[RxName]=" & "'" & Me![cmbRxName] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_cmdRxName_Click:
Exit Sub

Err_cmdRxName_Click:
MsgBox Err.Description
Resume Exit_cmdRxName_Click
End Sub
~~~~~~~~~~~~~~~~~~~~
Even when in the form, if I select the Form View from the menu it will not
display in the form view, on only the datasheet view. I have recreated
the form several times to be sure it is set up correctly, it still will
only display in the datasheet view. I have other forms created in Access
2007 that display in the Form View, but, even using Tabular or Justified
it will only display in datasheet view. I have checked everything I can
think of, but, since I have not had the happen before I am not sure what
else to check.

Thank you for your time and help. :)

Jan :)
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
D

Dirk Goldgar

Jan :) said:
Even when in the form, if I select the Form View from the menu it will not
display in the form view, on only the datasheet view. I have recreated
the form several times to be sure it is set up correctly, it still will
only display in the datasheet view. I have other forms created in Access
2007 that display in the Form View, but, even using Tabular or Justified
it will only display in datasheet view. I have checked everything I can
think of, but, since I have not had the happen before I am not sure what
else to check.

That's hard to explain, all right. What are the values of these form
properties, from the Format tab of the property sheet:

Default View
Allow Form View
Allow Datasheet View

?
 
Ad

Advertisements

J

Jan :\)

Trying again...sorry if this is a duplicate post...

Hi Bruce :)

Thank you very much for your time to help, it is truly appreciated. I will
check out your suggestions. Yes, the default view is still there and set
for Continuous Forms.

Jan :)

BruceM said:
I can't address the datasheet problem, but there is an extra quote in the
string (spaces added for clarity), assuming it is text:

stLinkCriteria = "[RxName] = " & ' " & Me![cmbRxName] & " ' "

If there are apostrophes in the value, substitute a pair of double quotes
for each single quote (apostrophe).

I'm not very familiar with Access 2007, but have you checked the Default
View property for the form (assuming it is still there in Access 2007)?

Jan :) said:
Dirk Goldgar said:
Hi all :) Vista SP1, Access 2007

I am trying to create a form to display the results using a sort/filter
form, but, no matter which form format I choose, Tabular, Justified or
Columnar, all I get is the datasheet view. I have the form set for
Continuous Forms, but, it will only display in Datasheet view as an
endless run of records making it difficult to tell where one leaves off
the the next one starts. I have recreated the form several times using
the various formats, and all it will display in is the datasheet view.

Any suggestions of what I might look at for clues would be appreciated.
I have never had this problem before.


Hi, Jan -

How are you opening this form? Directly, by double-clicking it in the
Nav Pane? Or are you opening it by code, maybe from a switchboard? If
you're opening it by code, is it possible that the code is explicitly
opening it in datasheet view, by using the acFormDS argument?

Hi Dirk! :)

I am opening via a filter form which has combo boxes from which I make a
selection of the name of the medication records that I want to view, and
then click on the related command button to open the form and display the
records in the display form. Here is the code behind that button:
~~~~~~~~~~~~~~~~~~~~~~
Private Sub cmdRxName_Click()
On Error GoTo Err_cmdRxName_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmMedsRec"

stLinkCriteria = "[RxName]=" & "'" & Me![cmbRxName] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_cmdRxName_Click:
Exit Sub

Err_cmdRxName_Click:
MsgBox Err.Description
Resume Exit_cmdRxName_Click
End Sub
~~~~~~~~~~~~~~~~~~~~
Even when in the form, if I select the Form View from the menu it will
not display in the form view, on only the datasheet view. I have
recreated the form several times to be sure it is set up correctly, it
still will only display in the datasheet view. I have other forms
created in Access 2007 that display in the Form View, but, even using
Tabular or Justified it will only display in datasheet view. I have
checked everything I can think of, but, since I have not had the happen
before I am not sure what else to check.

Thank you for your time and help. :)

Jan :)
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
J

Jan :\)

Second try...my apology if it is a duplicate....answer below

Dirk Goldgar said:
That's hard to explain, all right. What are the values of these form
properties, from the Format tab of the property sheet:

Hi Dirk, here is the information you requested:
Default View Continuous Forms
Allow Form View Yes
Allow Datasheet View No
The form is on a query, here is the SQL of that query:
~~~~~~~~~~~~~~~~~~~~
SELECT tblMeds.Provider, tblMeds.ProvFrom, tblMeds.RxName, tblMeds.RxNo,
tblMeds.RxDosage, tblMeds.RxStrength, tblMeds.RxType, tblMeds.RxFor,
tblMeds.IssueDate, tblMeds.LastFilled, tblMeds.RefillNo, tblMeds.RenewDate,
tblMeds.Active, tblMeds.InactiveDate, tblMeds.Comment
FROM tblMeds;
~~~~~~~~~~~~~~~~~~~

As we have worked together on another project off group some time back, you
know that I am not given to using anything but form view for display forms,
and this is no exception. I can't think of any reason why it would have to
do with Access 2007 installed on the Vista SP2, but, I haven't had the SP2
that long to be able to really tell. There are only 21 records in all, so
it is a simple table and simple query.

Jan :)
 
D

Dirk Goldgar

Jan :) said:
Second try...my apology if it is a duplicate....answer below

I don't see your first post. I wondered what had happened to you.
The form is on a query, here is the SQL of that query:
~~~~~~~~~~~~~~~~~~~~
SELECT tblMeds.Provider, tblMeds.ProvFrom, tblMeds.RxName, tblMeds.RxNo,
tblMeds.RxDosage, tblMeds.RxStrength, tblMeds.RxType, tblMeds.RxFor,
tblMeds.IssueDate, tblMeds.LastFilled, tblMeds.RefillNo,
tblMeds.RenewDate,
tblMeds.Active, tblMeds.InactiveDate, tblMeds.Comment
FROM tblMeds;
~~~~~~~~~~~~~~~~~~~

I don't see anything here that would explain it, either. Would you be
willing to send me the database, or a cut-down copy of it, so I can look at
more closely?
 
J

Jan :\)

Dirk Goldgar said:
I don't see your first post. I wondered what had happened to you.


I don't see anything here that would explain it, either. Would you be
willing to send me the database, or a cut-down copy of it, so I can look
at more closely?

Aye, Cap'n, I knows the drill, off to the tool box. :)

Jan :)
 
Ad

Advertisements

D

Dirk Goldgar

Dirk Goldgar said:
I don't see your first post. I wondered what had happened to you.


I don't see anything here that would explain it, either. Would you be
willing to send me the database, or a cut-down copy of it, so I can look
at more closely?


Note to lurkers: this has been resolved. It turns out that the form was
being displayed in Continuous Forms view after all; just with some
confusing formatting.
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top