syntax check

  • Thread starter Thread starter JethroUK©
  • Start date Start date
J

JethroUK©

form is based on 1 (clients) to many (quals) query and i want to add a new
qual (record) to currently displayed client:

qual = [clients].[ID]
DoCmd.GoToRecord , , acNewRec
[quals].[ID] = qual

where Client.ID is tied to Quals.ID - p.s. whilst both fields are included
in the query - neither are bound to any textbox (not ness)

i keep getting error "cannot find field '¦' "

have i got my syntax right (refering to the fields in the underlying
query) - or is the method totally wrong
 
using the query directly i can simply enter any client ID in the quals ID of
a new record and i get exactly what i want - that being a new record on the
many (quals) side already populated with details from the one( client) side

i'm starting to suspect the GoToRecord method may not be appropriate in this
case?
 
have narrowed the problem down by including only the [ID] from the many
(quals) side in the form query:

Dim qual As Long
qual = [ID] 'store ID from the current client
DoCmd.GoToRecord , , acNewRec
[ID] = qual 'write the client ID into the quals ID (lookup) - errors
here and i cant understand why - if i typed the ID into a textbox it would
be fine



JethroUK© said:
using the query directly i can simply enter any client ID in the quals ID of
a new record and i get exactly what i want - that being a new record on the
many (quals) side already populated with details from the one( client) side

i'm starting to suspect the GoToRecord method may not be appropriate in this
case?


JethroUK© said:
form is based on 1 (clients) to many (quals) query and i want to add a new
qual (record) to currently displayed client:

qual = [clients].[ID]
DoCmd.GoToRecord , , acNewRec
[quals].[ID] = qual

where Client.ID is tied to Quals.ID - p.s. whilst both fields are included
in the query - neither are bound to any textbox (not ness)

i keep getting error "cannot find field '¦' "

have i got my syntax right (refering to the fields in the underlying
query) - or is the method totally wrong
 
As I have answered in 2 of your other questions in these news groups, try to
follow conventional wisdom and place the quals in a subform.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top