query click

I

ifoundgoldbug

Greetings

quick question is it possible by clicking on a record in a query to
bring up a form with all of that records revelant data?

thanks
 
R

Rick Brandt

Greetings

quick question is it possible by clicking on a record in a query to
bring up a form with all of that records revelant data?

thanks

In a query datasheet, no. In a datasheet *form* that can be made to look
just like the query, yes.

Tables and query datasheets have no events for code or macros to use.
 
I

ifoundgoldbug

so how do you make a datasheet form that looks like a query? I have i
have tried this before and i never did get it down quite right.
 
I

ifoundgoldbug

let me clarify i can make the datasheet but I can't get the click to
work. basically i would like to click on a number and open up that
numbers record in another form.
 
R

Rick Brandt

let me clarify i can make the datasheet but I can't get the click to
work. basically i would like to click on a number and open up that
numbers record in another form.

What do you have in the Click event of the TextBox?
 
I

ifoundgoldbug

on the dbl_click event I have

docmd.openform ([work order])

neither of these work

when i try to just open the form it says can't find specified field "|"


i just need the form to load to the particular work order number that
you dbl click on.
i am a little frusterated i know i am missing something simple.

thanks for your time


Gold Bug
 
R

Rick Brandt

on the dbl_click event I have

docmd.openform ([work order])

In the event property box labeled "On Dbl Click..." you should have
[Event Procedure]. The line of code goes into the VBA window that comes up
when you press the builder button [...] to the right of the property box.

Is that what you did?

Also. The proper syntax for OpenForm is...

DoCmd.OpenForm "NameOfForm"

What is "[work order]" that you are using there?
 
I

ifoundgoldbug

yes I have the event proceedure in the dbl click it is the code that I
am having problems with.

the form name is "work order" therefor in code it is [work order]
Rick said:
on the dbl_click event I have

docmd.openform ([work order])

In the event property box labeled "On Dbl Click..." you should have
[Event Procedure]. The line of code goes into the VBA window that comes up
when you press the builder button [...] to the right of the property box.

Is that what you did?

Also. The proper syntax for OpenForm is...

DoCmd.OpenForm "NameOfForm"

What is "[work order]" that you are using there?
 
R

Rick Brandt

yes I have the event proceedure in the dbl click it is the code that I
am having problems with.

the form name is "work order" therefor in code it is [work order]

Square bracketing is for Field names with spaces in them in certain
circumstances. DoCmd.OpenForm needs the form name in quotes and with no
brackets.


DoCmd.OpenForm "work order"
 
Top