View Single Post
  #24  
Old February 9th, 2009, 03:55 AM posted to microsoft.public.access.tablesdbdesign
LTOSH
external usenet poster
 
Posts: 63
Default creating new database

thanks for understanding!

ok the first form...
the list box "client list"...is from a Client Name Query i created so i
could combine the first and last name together. the only column that is in
that query that is shown is Client Name.

"Gina Whipp" wrote:

LTOSH,

You're not struggling... you're learning!

Let's start at the first form...

You open that up and there is a list box containing all the Clients. What
are the columns in the list box?

--
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
...
In my client table...ClientID is the PK
In my Workout table...WorkoutID is the PK, then ClientID is next data type
is number, then ExerciseID is next data type is number.

in my form "Weightlifting" there is a listbox "Workout Date" (appears to
be
unbound, that is what it says in box in design form). the Command Button
on
that form that you gave me the code for is called "add workout" this is to
open my "add exercise" form.

i'm sorry i'm just struggling with this. thanks for your patience!

"Gina Whipp" wrote:

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