473,624 Members | 2,475 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to pass a parameter to SP from a form?

Hi,

I managed to do this by using a query and [Forms]![myForm]![..] syntax,
but it does not work with SPs. So I created a procedure with "@" to
define a paraemter, but how can I pass a value to this procedure from a
form?

Thanks for any suggestions.
Regards,

Maciek Zywno
Nov 13 '05 #1
3 1790
You need to use a pass-through query, and dynamically change the SQL
associated with the query to include the value you want passed.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Maciek Zywno" <mi****@gazeta. pl> wrote in message
news:cs******** **@inews.gazeta .pl...
Hi,

I managed to do this by using a query and [Forms]![myForm]![..] syntax,
but it does not work with SPs. So I created a procedure with "@" to define
a paraemter, but how can I pass a value to this procedure from a form?

Thanks for any suggestions.
Regards,

Maciek Zywno

Nov 13 '05 #2
Douglas J. Steele wrote:
You need to use a pass-through query, and dynamically change the SQL
associated with the query to include the value you want passed.

Thank you, but I've got two more questions:

- does it work with MS SQL server - I would like to use Access as a frontend
- does it work in Access2003? (I cannot see Pass-Through query in my
Access2003 as it is explained in http://support.microsoft.com/?kbid=303968)
- generally what tool other than Access would you suggest to build a
simple GUI front end to a database (preferably by wizards of course)

Regards,
Maciek Zywno
Nov 13 '05 #3
Yes, it works with SQL Server and with Access 2003. Reread the KB article:
pass-through queries are created exactly the same way in Access 2003 (select
Pass-Through from the SQL Specific submenu under the Query menu). And, in
fact, you don't even need to create a DSN first: you can set the Connect
property of the query to a DSN-less connection string.

I think Access is probably the best tool for this.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Maciek Zywno" <mi****@gazeta. pl> wrote in message
news:cs******** **@inews.gazeta .pl...
Douglas J. Steele wrote:
You need to use a pass-through query, and dynamically change the SQL
associated with the query to include the value you want passed.

Thank you, but I've got two more questions:

- does it work with MS SQL server - I would like to use Access as a
frontend
- does it work in Access2003? (I cannot see Pass-Through query in my
Access2003 as it is explained in
http://support.microsoft.com/?kbid=303968)
- generally what tool other than Access would you suggest to build a
simple GUI front end to a database (preferably by wizards of course)

Regards,
Maciek Zywno

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
14032
by: Belinda | last post by:
Hello All I have the following test.asp page which needs one parameter querystr but my querystr is a very long string value. When I send a long value the query string is getting truncated after some characters. Can you please kindly share the code segment to workaround how to pass such a long string value to a asp page. This is how I invoke the test page:
9
12869
by: Jay Douglas | last post by:
Hello, I am needing to pass a class object (this) by reference to a method in a different class. When I do the following code I get the error (Cannot pass '<this>' as a ref or out argument because it is read-only) .. Is there any way to make <this> not read-only? I have simplified the following code. There is a Task class and a Data Class. I am trying to pass the task class by ref to the data class. public class Task {
6
2157
by: Vern | last post by:
I'd like to make the following a generic method that all my forms can call to validate all the fields on the form. So how do I pass the form object that is represented as "this" in the following code, and how do I retrieve the list of all controls and child controls on that form (since I don't think I can just refer to Controls). #region AnyFieldErrors private bool AnyFieldErrors() {
24
55158
by: =?Utf-8?B?U3dhcHB5?= | last post by:
Can anyone suggest me to pass more parameters other than two parameter for events like the following? Event: Onbutton_click(object sender, EventArgs e)" Event handler: button.Click += new EventHandler(Onbutton_click); I want to pass more information related that event. & want to use that
12
11058
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms. Here is a newbie mistake that I found myself doing (as a newbie), and that even a master programmer, the guru of this forum, Jon Skeet, missed! (He knows this I'm sure, but just didn't think this was my problem; LOL, I am needling him) If...
0
8246
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8179
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8631
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8341
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8490
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6112
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.