|
 |
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
|
 |
|
|
 |

February 18th, 2005, 02:49 PM
|
Authorized User
|
|
Join Date: Feb 2004
Location: london, uk, United Kingdom.
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
mistake in code
Hello all guru's
Can any one help please
this is my code and by the on my form i dont use data source so all the fields that i need will call from my vb codes
strlink = "[tblUserSecurity_Sec.recid]=" & me.recid
or this one
strlink = "[tblUserSecurity_Sec.recid]=" & Me![tblUserSecurity_Sec.recid]
Best Regards,
Hamed Gholamian
|

February 18th, 2005, 04:23 PM
|
Friend of Wrox
|
|
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
|
|
Hi,
If you are trying to pass a text box or combo box value to a query (report based on a query), then you would use this syntax:
strLink = "[QueryFieldName] = " & Me.TextBoxOrComboBoxName
Please note the space between the = and the "
Also, make sure that if you are using a combo box from your form, that you have bound it to the right column. It should be bound to the same column as the QueryFieldName you are passing.
HTH
mmcdonal
|

February 23rd, 2005, 06:00 PM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
|
|
The space between the = and the " is not the issue. If you're trying to pass a string (i.e. text), then your statement should look like this (note the use of single quotes ' as delimiters):
strLink = "[QueryFieldName] = '" & Me.TextBoxOrComboBoxName & "'"
If the field holds a date then,
dtmLink = "[QueryFieldName] = #" & Me.TextBoxOrComboBoxName & "#"
And if the field holds a number (e.g. integer), you don't need anything
intLink = "[QueryFieldName] = " & Me.TextBoxOrComboBoxName
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
|

February 24th, 2005, 04:04 PM
|
Authorized User
|
|
Join Date: Feb 2004
Location: london, uk, United Kingdom.
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
thanks guys for your help i manage to fix it but dont ask how :) well with the help of one my friends but as soon as it is finish i will upload so every one can use it (well it helped me alot)
Best Regards,
Hamed Gholamian
Last edited by yami56; May 6th, 2011 at 09:02 AM..
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Similar Threads
|
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
Did you find a mistake? |
nzakas |
BOOK: Professional JavaScript for Web Developers ISBN: 978-0-7645-7908-0 |
47 |
July 18th, 2006 05:51 PM |
Mistake in code on page 151 |
MythicalMe |
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 |
0 |
May 22nd, 2006 01:11 PM |
mistake in my topics |
zakarya_hazara |
Classic ASP Basics |
1 |
October 9th, 2004 02:49 AM |
Dangerous mistake |
revinchalil |
SQL Server 2000 |
4 |
February 4th, 2004 12:06 PM |
|
 |