Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 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 .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 11th, 2006, 11:26 AM
Registered User
Join Date: Feb 2006
Location: Hoenefoss, , Norway.
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 Sub
    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 :)
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 11:32 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.