Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 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 February 11th, 2006, 11:26 AM
Registered User
 
Join Date: Feb 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default stLinkCriteria and an error about .!)

I have an MsAccess database with a form with several records as a result of a search. See http://home.c2i.net/wimalie/Alie/SearchForm.gif
The top picture shows the form in normal view, the below one in design view. I have created a commandbutton (visible under nr 2 with the OpenForm sign), which should link to related data in another form (open another form with just the data of the related records).
I have created the button via the command button Wizard which has resulted in the following code:
Private Sub ShowRecord2_Click()
On Error GoTo Err_ShowRecord2_Click
    Dim stDocName As String
    Dim stLinkCriteria As String
    stDocName = "Tapes"
    stLinkCriteria = "[B_Recordnr]=" & Me![Tekst27]
   DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_ShowRecord2_Click:
    Exit Sub
Err_ShowRecord2_Click:
    MsgBox Err.Description
    Resume Exit_ShowRecord2_Click
End Sub
----------------
When trying to use the CommandButton I get the error: Invalid use of dot (.), exclamation mark (!) or parantheses.

I have tried to do the same without the Wizard choosen Open form and show all posts, and then the form opens, of course with irrelevant records. My conclusion is that the error must be in the red marked part.
Does this sound familiar to anyone? Suggestions


Alie :)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
Ch 4: Parse error: syntax error, unexpected T_SL hanizar77 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 June 23rd, 2008 09:17 PM
[Resolved] Error calling a sp - parameter error snufse .NET Framework 2.0 2 February 12th, 2008 04:46 PM
stLinkCriteria - Multiple Criteria andyv123 Access 1 September 8th, 2006 10:02 AM
multiple stLinkCriteria? universal Access VBA 1 January 31st, 2004 02:15 PM





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