View Single Post
  #21  
Old February 9th, 2009, 01:30 AM posted to microsoft.public.access.tablesdbdesign
Gina Whipp
external usenet poster
 
Posts: 3,500
Default creating new database

LTOSH,

Is not the bound field for your list box ClientID? If it is not thatis the
syntax error. To find out which field is the bound field...tell me what
columns you have in your list box and which one is first, second...

In the NameOfYourListBox goes the name of the list box from the form that
has the button on it.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"LTOSH" wrote in message
...
yes Deeeeeeep breath...sorry get OCD when it comes to this hahaha.

ok, in your code below. Do i put in the [nameofyourlistbox] the "workout
date" for that list box? is that right or which listbox?

when i put it in my code...the is the error i get...Syntax error (missing
operator) in query expression '[ClientID]='.

"Gina Whipp" wrote:

Private Sub Add_Workout_Click()
On Error GoTo Err_Add_Workout_Click

DoCmd.OpenForm "Workout Details", , , "[ClientID]=" &
Me![NameOfYourListBox]

Exit_Add_Workout_Click:
Exit Sub

Err_Add_Workout_Click:
MsgBox Err.Description
Resume Exit_Add_Workout_Click

End Sub


--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"LTOSH" wrote in message
...
Private Sub Add_Workout_Click()
On Error GoTo Err_Add_Workout_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Workout Details"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Add_Workout_Click:
Exit Sub

Err_Add_Workout_Click:
MsgBox Err.Description
Resume Exit_Add_Workout_Click

End Sub


This is on my weightlifting form...the button is Add Workout. This
opens
the Workout details screen. this is where i could type the workout
date.
then there is a command button named add exercise. here is the code
for
this
button.
Private Sub Add_Exercise_Click()
On Error GoTo Err_Add_Exercise_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Add Exercise"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Add_Exercise_Click:
Exit Sub

Err_Add_Exercise_Click:
MsgBox Err.Description
Resume Exit_Add_Exercise_Click

End Sub

This opens a form to add the exercise that is a combo box so i can pick
the
exercise i want to add, then fill in sets, reps weight. i am able to do
all
this but it is not client specific.

maybe i'm making this harder than it has to be?

"Gina Whipp" wrote:

You have a button that is opening the form but not with the correct
information, so...

Go to deisgn mode of the form that has the button...
Click on the button and bring up properties and then go do to the
On-Click
event procedure and click the button with the dots on it...
Then copy everything between Private Sub and End Sub

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"LTOSH" wrote in message
...
ClientID is my PK and is autonumber.

copy/paste what code?? where do i get the code you are asking for?


"Gina Whipp" wrote:

LTOSH,

Please copy/paste the code you are using and is ClientID text or
numeric?

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"LTOSH" wrote in message
...
my forms are opening fine. it's the information that is not
associating
with
the specific client. eventhough i click one specific client and
go
into
the
weightlifting page and adding information it is not associated
with
that
one
specific client. does that make sense?

"Gina Whipp" wrote:

LTOSH,

"...I'm a 'her' hehehe..." Oops, my mistake... Sorry about
that!

Did you try to use the command button wizard? If the wizard
failed
then
tell me the exact name of the form(s) you are strying to open.

--
Gina Whipp

"I feel I have been denied critical, need to know,
information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"LTOSH" wrote in message
...
Hi Gina...thanks for support here! By the way...I'm a 'her'
hehehe.

ok...here is where i am and need help i think with
relationships.
As i
stated in first email i want to click a client name then add
information
specific only to that client. Here is what i have going on.

Main Switchboard I have a list box with client name. Then I
have
command
buttons to take me to other specific switchboards (ex.
Weightlifting,
Cardio). I want to click the client name then click the
command
button
"WEIGHTLIFTING" to take me to this switchboard. Once on the
"WEIGHTLIFTING"
screen i have a list box "workout date" and a listbox
"Workout".
Here
is
where i want the relationship of "workout date' and "client"
to
be
associated, to be specific to this client. I also want
"workout
date"
to
be
specific to specific dates. Example. for 02/07/09 i have
chosen
specific
exercises. for 02/08/09 i want specific exercises. How do i
make
these
associations or relationships? i hope i make sense.

Just for clarity...i have 3 tables..."CLIENT" "EXERCISES"
"WORKOUT"
"WORKOUT" table is where the new created workouts would be
stored.

Thanks so much for help! This is so exciting this coming
together.

"Gina Whipp" wrote:

Keith,

In his first eMail he asked about his table set-up and he now
has a
Client
table, Exercise table and a Workout table pulling those the
first
two
tables
togehter. You might not have seen those postings,

--
Gina Whipp

"I feel I have been denied critical, need to know,
information!" -
Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

"Keith Wilby" wrote in message
...
"LTOSH" wrote in message
...

i have a form (using as switchboard) where i want to put a
command
button
to
create workout. how can i put on that popup form a small
window
on
the
left
that lists clients to click...then a window like a
datasheet
on
the
right

Whoa! First things first! Get your tables, relationships
and
indexing
sorted out before you start thinking about whistles and
bells
in
your
GUI.
If you don't have a solid foundation of tables to build
your
application
on then it may well end up collapsing around you and you'll
have
some
re-work at the very least.

2p supplied

Keith.
www.keithwilby.co.uk