G
Guest
when my cursor is in the field of a form which is a primary key, i can not go
to the next record. how do i fix this problem?
to the next record. how do i fix this problem?
Russ said:when my cursor is in the field of a form which is a primary key, i
can not go to the next record. how do i fix this problem?
Russ said:Dirk,
when i open the form, the first field i have is last name. this is
one of the primary keys in my table for the form. if the cursor is in
the last name field, (so i can enter data in it) i can not go the
next record. this is a problem becasue my form opens up all of the
records in the table. so i need to hit the button to go to a blank
form to enter a new record. becasue the cursor is in the last name
field, it will not let me go to the next record or a blank record. i
need to click in a field that is not a primar key, like age.
Russ said:yes there is a pencil in the corner after i click the next button.
when i double click teh pencil it turns to an arrow and i can scroll
through records like i expect. how do i make the form open up like
this, so i dont have to double click the pencil. what do you mean by
"dirty?"
Russ said:Yes, now it makes sense. I use a macro because my form is meant to
enter information into 2 different tables. the tables are linked by
SSN, with a one to many relationship. the only 2 common fields for
the 2 tables is SSN and LastName. for these 2 fields in the second
table, they are not in the form visually, but they are part of the
data set. the macro i use sets the SSN that i enter or that is
already there as teh SSN of the second table. same with the LastName.
is there a better way to do this? it is these 2 fields that are not
letting me go to the next record when the cursor is in that field.
should i use code instead? is there a better way to link the 2
tables into one form?
2. The name of Table 1 is Demographics. Fields are LastName, FirstName, SSN (this is the primary key), DOB, Age, Sex, Phone, Address, City, State, Zip
3. In Demographics : no fields are indexed
5. Referential integrity is enforced for cascading updates and deletes.
6. Demographics and New_Visit are related by SSN. Demographics is on the 1 side and New_Visit is on the many side.
Russ said:Dirk,
1. The SQL of the recordsource is: SELECT Demographics.LastName,
Demographics.FirstName, Demographics.SSN, Demographics.DOB,
Demographics.Age, Demographics.Sex, Demographics.Attending,
New_Visit.LastName, New_Visit.SSN, New_Visit.DateOfVisit,
New_Visit.VisitLocERClinicFloorECF, New_Visit.Side,
New_Visit.Location, New_Visit.Joint, New_Visit.TypeOfInjury,
New_Visit.TimePain, New_Visit.Pain_DWMY FROM Demographics INNER JOIN
New_Visit ON Demographics.SSN = New_Visit.SSN ORDER BY
Demographics.LastName;
Table 2 is named New_Visit. The Fields are LastName, SSN (primary
key), DateOfVisit (primary key), VisitLocERClinicFloorECF, Side,
Location, Joint, TypeOfInjury, demographics, Allergic, Injury,
TimePain, Pain_DWMY, and several others that are not used in the form.
In New_Visit : LastName and SSN are indexed such that duplicates are
OK.
4. Table 1 the SSN is the primary key. Table 2 (New Visit) SSN and
DateofVisit are the primary key.
Although lastname is not related, when i enter the record in teh form
i need the last name and SSN to go to both tables.
Also concernign teh age. I want to enter the Date of Birht, DOB, and
have the age calculated. It is my understanding that a calculated
value should not be stored.
Right.
However, this data that is entered and
sent to the Palm Pilot. So I need the value, age, to be in a table to
go to the palm. i have a code taht calculates this value on the
click of the age field. is tehre a way to have this recalcuated when
the form is opened or when the persons age changes, everyyear?
Russ said:Dirk,
thank you for your help so far. the problem is the database software
on teh palm is not a relationship database. so the last name must be
carried through all of the forms that i use.
second, the form i am
attempting to construct is for entry of a new patient, but usually i
have to enter the demographics as well if the patient has never been
to the clinic before. so the point of the form is to only open and
enter information into one form and not two (demographics adn new
visit). the rest of the info is filled in on the palm. so will this
method you gave me allow for new entry without a record in
demographics? it will put the patient in demographics adn new visit
right?
how do i go about having the last name automatically entered
into new_visit? i dont really want to re-type it.