Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 12th, 2006, 06:40 PM
Registered User
 
Join Date: Sep 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default ms access form as criteria on sql server backend

hi guys

i have an access form link to a sql server backend. i'm wanting to have a form textfield as a criteria on a stored procedure.

how do i do this?

i entered:
=[Forms]![frmNewJob]![Job_no]
and it did this which prompts for the field name
= @_Forms___frmNewJob___Job_no_
i also tried
=N'[Forms]![frmNewJob]![Job_no]' but that treats it as a string ("[Forms]![frmNewJob]![Job_no]") and not a form value

anyone done this?

 
Old September 13th, 2006, 12:14 PM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Take the value as a variable, and pass the variable:

Dim iJob As Integer (It looks like an integer field)

iJob = Me.Job_No

Now pass iJob to the SP.

Are you using an event on the form to trigger the SP?

Does this help?

mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Locking in Access DB linked to SQL Server backend gibbers Access 3 April 24th, 2007 03:20 PM
MS ACCESS 2003 FRONTEND AND MS SQL SERVER 2005 DB mohankumar0709 SQL Server 2005 3 March 23rd, 2007 12:48 AM
Access Reports from SQL backend feets Access VBA 1 January 5th, 2007 08:36 AM
Access database/SQL Server backend Question vbJupiter Access VBA 1 October 6th, 2006 07:59 PM
Access MDB with SQL Backend ashg657 Access 2 July 18th, 2006 12:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.