Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / November 2007

Tip: Looking for answers? Try searching our database.

error message on naming subform

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michell Vandell - 21 Nov 2007 10:16 GMT
i have a form where you need to enter a name in a field which, at some point
generates a warning. when this warning appears you have to click a button to
check how many times this name appears in the databse. this button activates
a subform in the forms footer area and at the same time an error message that
the used form name is not according to the Microsoft Access naming convention.

the name is : subformulier_naamgast (this is dutch for subform_.....)

after having checked the naming convention i don't see what i have done wrong.

thanks for helping met out.

regards,

Michell van Andel
Maurice - 22 Nov 2007 19:36 GMT
Michell,

Place your code here so we can check what might be wrong with it...

Signature

Maurice Ausum

> i have a form where you need to enter a name in a field which, at some point
> generates a warning. when this warning appears you have to click a button to
[quoted text clipped - 11 lines]
>
> Michell van Andel
Michell Vandell - 27 Nov 2007 11:14 GMT
Hi Maurice,

here's my code:

Private Sub checkNaam_Click()
On Error GoTo Err_checkNaam_Click

   Dim stDocName As String, stquery As String
   stquery = "SELECT id, datum, perscode, sponsorkaart, voorlgast,
tussengast, achtergast, handicap, homeclub, bedrag " & _
"FROM invoer WHERE achtergast=me.achtergast "
   Me.Subformulier_naamgast.Visible = True
   Me.Subformulier_naamgast.SourceObject = stquery

Exit_checkNaam_Click:
   Exit Sub

Err_checkNaam_Click:
   MsgBox Err.Description
   Resume Exit_checkNaam_Click
   
End Sub

thanks for helping.

rgds

Michell

> Michell,
>
[quoted text clipped - 15 lines]
> >
> > Michell van Andel
Maurice - 27 Nov 2007 18:07 GMT
Hi Michell,

Your stquery is causing the problem. You have to close the statement before
you can parametize it.

Try the following:

stquery = "SELECT id, datum, perscode, sponsorkaart, voorlgast,
tussengast, achtergast, handicap, homeclub, bedrag " & _
"FROM invoer WHERE achtergast= '" & me.achtergast "'"

after the WHERE achtergast= there is a single quote and a double quote
(enkele apostroph en dubbele aanhalingsteken) and after the me.achtergast is
a double quote, single quote and a double quote again (dus dubbele, enkele en
een dubbele aanhalingsteken).

hth
Signature

Maurice Ausum

> Hi Maurice,
>
[quoted text clipped - 44 lines]
> > >
> > > Michell van Andel
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.