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 / Macros / October 2004

Tip: Looking for answers? Try searching our database.

Open form to specific record

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wylie C - 27 Oct 2004 19:09 GMT
I want to open a form to a record specified by the user through an input box.
The control on the form that contains the number is txtProject. Here is the
code I am trying to make work:

strProjNum = Val(Inputbox("Enter project number","Project Number:"
DoCmd.OpenForm"ProjectsForm",,,"txtProject" & "=" & strProjNum

Thanks
Steve Schapel - 28 Oct 2004 07:39 GMT
Wylie

Is the data in the txtProject field a number or text data type?

Signature

Steve Schapel, Microsoft Access MVP

> I want to open a form to a record specified by the user through an input box.
> The control on the form that contains the number is txtProject. Here is the
[quoted text clipped - 4 lines]
>
> Thanks
Wylie C - 30 Oct 2004 07:47 GMT
Steve,
It is a number field.

> Wylie
>
[quoted text clipped - 8 lines]
> >
> > Thanks
Steve Schapel - 30 Oct 2004 09:00 GMT
Wylie,

Ok, so as far as I can make out, the code would be like this...
 Dim strProjNum As Long
 strProjNum = Inputbox("Enter project number","Project Number:")
 DoCmd.OpenForm "ProjectsForm", , , "[txtProject]=" & strProjNum

Signature

Steve Schapel, Microsoft Access MVP

> Steve,
> It is a number field.
 
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.