Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / October 2005

Tip: Looking for answers? Try searching our database.

DoCmd.Open form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
hzgt9b@nopost.com - 25 Oct 2005 19:31 GMT
I want to open a form and restrict which records are displayed on it...
here's what I've got:

   DoCmd.OpenForm "frmConfigValue", , , "Key = 'TargetArchive'"

Problem is that all the records from the table are being displayed on the
form... the Whereclause above doesn't seem to be having an effect... any idea
what the problem is here?
Ofer - 25 Oct 2005 19:42 GMT
Its seems to be OK.
Does the records display in a subform? If that the case the where statement
doesn't apply to sub form, only to the main form

Signature

If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.

Good luck

> I want to open a form and restrict which records are displayed on it...
> here's what I've got:
[quoted text clipped - 4 lines]
> form... the Whereclause above doesn't seem to be having an effect... any idea
> what the problem is here?
hzgt9b@nopost.com - 25 Oct 2005 19:47 GMT
No, the form I'm opening, frmConfigValue, is to open as a form itself, not as
a sub-form inside another form....

> Its seems to be OK.
> Does the records display in a subform? If that the case the where statement
[quoted text clipped - 8 lines]
> > form... the Whereclause above doesn't seem to be having an effect... any idea
> > what the problem is here?
Ofer - 25 Oct 2005 19:57 GMT
Do you have any code on the Load event of the form, where you might change
the record source?
Signature

If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.

Good luck

> No, the form I'm opening, frmConfigValue, is to open as a form itself, not as
> a sub-form inside another form....
[quoted text clipped - 11 lines]
> > > form... the Whereclause above doesn't seem to be having an effect... any idea
> > > what the problem is here?
hzgt9b@nopost.com - 25 Oct 2005 20:04 GMT
Oops... yea that's it... I should have remembered that...

So now, will I be able make use of the paramter in that DoCmd.Open command?
If so, how?

> Do you have any code on the Load event of the form, where you might change
> the record source?
[quoted text clipped - 14 lines]
> > > > form... the Whereclause above doesn't seem to be having an effect... any idea
> > > > what the problem is here?
Ofer - 25 Oct 2005 20:16 GMT
Yes you can, try and pass the criteria using the OpenArgs
DoCmd.OpenForm "frmConfigValue", , , , , ,"Key = 'TargetArchive'"
On the Load event you can add the OpenArgs as a criteria

Me.RecordSource = "Select TableName.* From TableName Where " & Me.OpenArgs
Signature

If I answered your question, please mark it as an answer. That way, it will
stay saved for a longer time, so other can benifit from it.

Good luck

> Oops... yea that's it... I should have remembered that...
>
[quoted text clipped - 19 lines]
> > > > > form... the Whereclause above doesn't seem to be having an effect... any idea
> > > > > what the problem is here?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.