Changing Order in a table

B

BruceM

Is there a link (relationship) between the main form's record source and the
subform's record source? If so, are the Link Child and Link Parent
properties of the subform control (the "box" on the main form containing the
subform) set to the linking field?

To confirm, please confirm that the form in question:

1) Has the Data Entry property set to Yes
2) Has the Cycle Property set to All Records
3) Has Allow Additions set to Yes

If so, what happens when you press the Tab key after completing record
entry? If you keep pressing it, does it go to another record eventually?
If so, click View >> Tab Order and set the Tab Order so that using the Tab
key sends the user from one control to the other in an order that makes
sense, or according to the left-to-right arrangement of the controls on
the
form, so that the last control to receive data is the last in the list.


Start by making sure the form's Cycle property is set to All Records.
"Lisa" <[email protected]> wrote in message
On Apr 28, 12:13 pm, "BruceM" <bamoob_at_yawhodotcalm.not> wrote:
On Apr 28, 10:46 am, "BruceM" <bamoob_at_yawhodotcalm.not> wrote:
Is the form open, and are you absolutely sure everything is
spelled
correctly?
On Apr 28, 6:03 am, "BruceM" <bamoob_at_yawhodotcalm.not> wrote:
What error is that?
On Apr 27, 2:29 pm, "BruceM" <bamoob_at_yawhodotcalm.not> wrote:
One thing you can do is to make a single form with its Data
Entry
property
set to Yes. This means it can by used only for adding records,
and
for
viewing records added in the current session. You can prevent
record
navigation for the most part by removing the navigation
buttons.
I
will
call this form sfrmAdd.
Copy sfrmAdd as sfrmView. Change the Default View to
Continuous,
and
Data
Entry to No. You can set Allow Additions to No to prevent
using
this
form
to add new records, and to avoid the blank row that normally
appears
on
a
continuous form. Set Allow Edits and Allow Deletions as needed
for
your
situation. Make it tall enough to show several records.
Add sfrmAdd as a subform, and sfrmView as another subform just
below
it.
I
will call the subform controls (the "boxes" in which the
subforms
are
contained on the form) fsubAdd and fsubView. You can size the
subforms
so
they look like one continuous form, particularly if neither
has
a
border.
sfrmAdd can have the table as its Record Source. sfrmAdd can
have
a
query
based on the table as its Record Source, sorted as you would
like.
In
the
After Update event of sfrmAdd:
Forms!MainFormName!fsubView.Form.Requery
When I have done this I have the users tab out of the last
field
to go
to
a
new record, but you could use a command button if you prefer.
In
any
case,
requery in the After Update event as described. The just-added
item in
sfrmAdd will show up in the continuous form.
On Apr 27, 12:41 pm, "BruceM" <bamoob_at_yawhodotcalm.not>
wrote:
They should not be entering data directly into a table.
That's
what
forms
are for. In a table there is no way to do what you seek. In
a
form
there
are a number of options, including seeing just one record at
a
time.

Is it possible to have the first row of a table show the
"blank
record
line" instead of the first record. That way when people
enter
into
that table they don't have to scroll down to the end to
insert
a
new
entry into the table.- Hide quoted text -
- Show quoted text -
Sorry I wasn't clear. That table is a subform on a form. So
when
they open the form and find that table to enter data into I
want
the
first line blank so they don't have to scroll to the bottom.
Otherwise, there are daily entries they have to scroll through
to
get
to the bottom of the table. W- Hide quoted text -
- Show quoted text -
Great suggestion Bruce. There are so many tricks to learn in
Access.
I followed every step and the only problem I have is the after
update
event. Here is the code and it does not work. The
frm_NewPatientEntry is the main form where the
fsub_nursedatesview
is
located. Is this correct? Did I miss something? When I make an
entry now I get an error after I tab out of the field.
Forms!frm_NewPatientEntry!fsub_nursedatesview.Form.Requery- Hide
quoted
text -
- Show quoted text -
It says it can't find the form name.- Hide quoted text -
- Show quoted text -
Yes. The main form I am using has both subforms on it. The
dataeentry form and the view form. The main form is called frm
NewPatientEntry. There is no underscore in the actual name but I had
to add it in the code. I even changed the name of the main form to
the data entry form thinking I was supposed to use that form and I
get
the same error. It can't find the form name. Any ideas?
If there is no underscore in the actual name but there is an
underscore
in
the code then the names are not exactly the same, and the code
cannot
work.
You need to rename the form, or you can enclose the *actual* form
name
in
square brackets, which is necessary when any name contains anything
other
than letters, numbers, and underscores:
Forms![frm NewPatientEntry]![fsub nursedatesview].Form.Requery
It is best to avoid anything other than letters, numbers, and
underscores in
any names.- Hide quoted text -
- Show quoted text -
Thank you so much. That fixed it. It looks great. The only other
problem I see is that on my main form when I go from one record to the
next the data entry form to add into does not remain blank. It shows
all the entries made into it. It only shows blank the first time I
open the data base. If we tab off after adding a record a blank line
does appear as it should. But if I advance to the next record my data
entry form does not remain blank.- Hide quoted text -
- Show quoted text -
I figured out what I did. I must have taken it off single form. So
now I only see the one record added. However, when I tab off the
field like you mentioned it doesnt go to a new record. How do I make
that happen?- Hide quoted text -
- Show quoted text -

I tried that and its not working.- Hide quoted text -

- Show quoted text -

I just replied with a long message but it doesn't seem to be posting.
So I am going to shorten my response in case it just takes a while.
But everything you told me to do is done and does work fine the first
time I open the Main form that this is located on. I can view my
entry just fine and it updates just fine. The problem is when I
advance the main form to the next record. That is when the subform
"add" no longer shows a blank line. It shows the last entry I made on
that particular record. The blank line only appears the first time
the database is open. The main form has its own set of records from
my new "add" form. and the new "add" information stays with the
correct record on the main form it just won't give me a blank line for
a new record everytime I move from record to record on the new form.
Thanks for taking the time to help me with this!!!
 
L

Lisa 1022

Is there a link (relationship) between the main form's record source and the
subform's record source?  If so, are the Link Child and Link Parent
properties of the subform control (the "box" on the main form containing the
subform) set to the linking field?


To confirm, please confirm that the form in question:
1) Has the Data Entry property set to Yes
2) Has the Cycle Property set to All Records
3) Has Allow Additions set to Yes
If so, what happens when you press the Tab key after completing record
entry? If you keep pressing it, does it go to another record eventually?
If so, click View >> Tab Order and set the Tab Order so that using the Tab
key sends the user from one control to the other in an order that makes
sense, or according to the left-to-right arrangement of the controls on
the
form, so that the last control to receive data is the last in the list.
"Lisa" <[email protected]> wrote in message
On Apr 28, 1:40 pm, "BruceM" <bamoob_at_yawhodotcalm.not> wrote:
Start by making sure the form's Cycle property is set to All Records.
On Apr 28, 12:13 pm, "BruceM" <bamoob_at_yawhodotcalm.not> wrote:
On Apr 28, 10:46 am, "BruceM" <bamoob_at_yawhodotcalm.not> wrote:
Is the form open, and are you absolutely sure everything is
spelled
correctly?
On Apr 28, 6:03 am, "BruceM" <bamoob_at_yawhodotcalm.not> wrote:
What error is that?
On Apr 27, 2:29 pm, "BruceM" <bamoob_at_yawhodotcalm.not> wrote:
One thing you can do is to make a single form with its Data
Entry
property
set to Yes. This means it can by used only for adding records,
and
for
viewing records added in the current session. You can prevent
record
navigation for the most part by removing the navigation
buttons.
I
will
call this form sfrmAdd.
Copy sfrmAdd as sfrmView. Change the Default View to
Continuous,
and
Data
Entry to No. You can set Allow Additions to No to prevent
using
this
form
to add new records, and to avoid the blank row that normally
appears
on
a
continuous form. Set Allow Edits and Allow Deletions as needed
for
your
situation. Make it tall enough to show several records.
Add sfrmAdd as a subform, and sfrmView as another subform just
below
it.
I
will call the subform controls (the "boxes" in which the
subforms
are
contained on the form) fsubAdd and fsubView. You can size the
subforms
so
they look like one continuous form, particularly if neither
has
a
border.
sfrmAdd can have the table as its Record Source. sfrmAdd can
have
a
query
based on the table as its Record Source, sorted as you would
like.
In
the
After Update event of sfrmAdd:
Forms!MainFormName!fsubView.Form.Requery
When I have done this I have the users tab out of the last
field
to go
to
a
new record, but you could use a command button if you prefer.
In
any
case,
requery in the After Update event as described. The just-added
item in
sfrmAdd will show up in the continuous form.
On Apr 27, 12:41 pm, "BruceM" <bamoob_at_yawhodotcalm.not>
wrote:
They should not be entering data directly into a table.
That's
what
forms
are for. In a table there is no way to do what you seek. In
a
form
there
are a number of options, including seeing just one recordat
a
time.

Is it possible to have the first row of a table show the
"blank
record
line" instead of the first record. That way when people
enter
into
that table they don't have to scroll down to the end to
insert
a
new
entry into the table.- Hide quoted text -
- Show quoted text -
Sorry I wasn't clear. That table is a subform on a form. So
when
they open the form and find that table to enter data into I
want
the
first line blank so they don't have to scroll to the bottom..
Otherwise, there are daily entries they have to scroll through
to
get
to the bottom of the table. W- Hide quoted text -
- Show quoted text -
Great suggestion Bruce. There are so many tricks to learn in
Access.
I followed every step and the only problem I have is the after
update
event. Here is the code and it does not work. The
frm_NewPatientEntry is the main form where the
fsub_nursedatesview
is
located. Is this correct? Did I miss something? When I make an
entry now I get an error after I tab out of the field.
Forms!frm_NewPatientEntry!fsub_nursedatesview.Form.Requery- Hide
quoted
text -
- Show quoted text -
It says it can't find the form name.- Hide quoted text -
- Show quoted text -
Yes. The main form I am using has both subforms on it. The
dataeentry form and the view form. The main form is called frm
NewPatientEntry. There is no underscore in the actual name but I had
to add it in the code. I even changed the name of the main form to
the data entry form thinking I was supposed to use that form and I
get
the same error. It can't find the form name. Any ideas?
If there is no underscore in the actual name but there is an
underscore
in
the code then the names are not exactly the same, and the code
cannot
work.
You need to rename the form, or you can enclose the *actual* form
name
in
square brackets, which is necessary when any name contains anything
other
than letters, numbers, and underscores:
Forms![frm NewPatientEntry]![fsub nursedatesview].Form.Requery
It is best to avoid anything other than letters, numbers, and
underscores in
any names.- Hide quoted text -
- Show quoted text -
Thank you so much. That fixed it. It looks great. The only other
problem I see is that on my main form when I go from one record to the
next the data entry form to add into does not remain blank. It shows
all the entries made into it. It only shows blank the first time I
open the data base. If we tab off after adding a record a blank line
does appear as it should. But if I advance to the next record my data
entry form does not remain blank.- Hide quoted text -
- Show quoted text -
I figured out what I did. I must have taken it off single form. So
now I only see the one record added. However, when I tab off the
field like you mentioned it doesnt go to a new record. How do I make
that happen?- Hide quoted text -
- Show quoted text -
I tried that and its not working.- Hide quoted text -
- Show quoted text -

I just replied with a long message but it doesn't seem to be posting.
So I am going to shorten my response in case it just takes a while.
But everything you told me to do is done and does work fine the first
time I open the Main form that this is located on.  I can view my
entry just fine and it updates just fine.  The problem is when I
advance the main form to the next record.  That is when the subform
"add" no longer shows a blank line.  It shows the last entry I made on
that particular record.  The blank line only appears the first time
the database is open.  The main form has its own set
...

read more »- Hide quoted text -

- Show quoted text -

I did not have a relationship but I created one and everything works
fine with that even before I created it. Like I mentioned, the only
problem I have is the subform where I add a new record which is set to
single form will not remain blank when I switch from record to record
of the main form. I think I might have to figure out a different
route since this doesn't seem to want to work for me. I appreciate
the time you spent giving me guidance.
 
B

BruceM

What are the subform control's Link Parent and Link Child properties? If
you do not understand the question, which I described in more detail in my
previous posting, say so and I will explain more fully. With this property
not set you would get the behavior you describe, as I understand it from
what you have written.

The relationship is to create the link between the main form record and the
related subform records. You probably have an employee record in a database
somewhere, then there are related records for each paycheck. If those two
tables are not related there is no way to associate a paycheck record with
your employee record. The interface may have looked OK, but I don't see how
the database could have worked.

Is there a link (relationship) between the main form's record source and
the
subform's record source? If so, are the Link Child and Link Parent
properties of the subform control (the "box" on the main form containing
the
subform) set to the linking field?


To confirm, please confirm that the form in question:
1) Has the Data Entry property set to Yes
2) Has the Cycle Property set to All Records
3) Has Allow Additions set to Yes
If so, what happens when you press the Tab key after completing record
entry? If you keep pressing it, does it go to another record eventually?
If so, click View >> Tab Order and set the Tab Order so that using the
Tab
key sends the user from one control to the other in an order that makes
sense, or according to the left-to-right arrangement of the controls on
the
form, so that the last control to receive data is the last in the list.
"Lisa" <[email protected]> wrote in message
On Apr 28, 1:40 pm, "BruceM" <bamoob_at_yawhodotcalm.not> wrote:
Start by making sure the form's Cycle property is set to All Records.
On Apr 28, 12:13 pm, "BruceM" <bamoob_at_yawhodotcalm.not> wrote:
On Apr 28, 10:46 am, "BruceM" <bamoob_at_yawhodotcalm.not> wrote:
Is the form open, and are you absolutely sure everything is
spelled
correctly?
On Apr 28, 6:03 am, "BruceM" <bamoob_at_yawhodotcalm.not> wrote:
What error is that?
On Apr 27, 2:29 pm, "BruceM" <bamoob_at_yawhodotcalm.not>
wrote:
One thing you can do is to make a single form with its Data
Entry
property
set to Yes. This means it can by used only for adding
records,
and
for
viewing records added in the current session. You can
prevent
record
navigation for the most part by removing the navigation
buttons.
I
will
call this form sfrmAdd.
Copy sfrmAdd as sfrmView. Change the Default View to
Continuous,
and
Data
Entry to No. You can set Allow Additions to No to prevent
using
this
form
to add new records, and to avoid the blank row that normally
appears
on
a
continuous form. Set Allow Edits and Allow Deletions as
needed
for
your
situation. Make it tall enough to show several records.
Add sfrmAdd as a subform, and sfrmView as another subform
just
below
it.
I
will call the subform controls (the "boxes" in which the
subforms
are
contained on the form) fsubAdd and fsubView. You can size
the
subforms
so
they look like one continuous form, particularly if neither
has
a
border.
sfrmAdd can have the table as its Record Source. sfrmAdd can
have
a
query
based on the table as its Record Source, sorted as you would
like.
In
the
After Update event of sfrmAdd:
Forms!MainFormName!fsubView.Form.Requery
When I have done this I have the users tab out of the last
field
to go
to
a
new record, but you could use a command button if you
prefer.
In
any
case,
requery in the After Update event as described. The
just-added
item in
sfrmAdd will show up in the continuous form.
On Apr 27, 12:41 pm, "BruceM" <bamoob_at_yawhodotcalm.not>
wrote:
They should not be entering data directly into a table.
That's
what
forms
are for. In a table there is no way to do what you seek.
In
a
form
there
are a number of options, including seeing just one record
at
a
time.

Is it possible to have the first row of a table show the
"blank
record
line" instead of the first record. That way when people
enter
into
that table they don't have to scroll down to the end to
insert
a
new
entry into the table.- Hide quoted text -
- Show quoted text -
Sorry I wasn't clear. That table is a subform on a form. So
when
they open the form and find that table to enter data into I
want
the
first line blank so they don't have to scroll to the bottom.
Otherwise, there are daily entries they have to scroll
through
to
get
to the bottom of the table. W- Hide quoted text -
- Show quoted text -
Great suggestion Bruce. There are so many tricks to learn in
Access.
I followed every step and the only problem I have is the after
update
event. Here is the code and it does not work. The
frm_NewPatientEntry is the main form where the
fsub_nursedatesview
is
located. Is this correct? Did I miss something? When I make an
entry now I get an error after I tab out of the field.
Forms!frm_NewPatientEntry!fsub_nursedatesview.Form.Requery-
Hide
quoted
text -
- Show quoted text -
It says it can't find the form name.- Hide quoted text -
- Show quoted text -
Yes. The main form I am using has both subforms on it. The
dataeentry form and the view form. The main form is called frm
NewPatientEntry. There is no underscore in the actual name but I
had
to add it in the code. I even changed the name of the main form to
the data entry form thinking I was supposed to use that form and I
get
the same error. It can't find the form name. Any ideas?
If there is no underscore in the actual name but there is an
underscore
in
the code then the names are not exactly the same, and the code
cannot
work.
You need to rename the form, or you can enclose the *actual* form
name
in
square brackets, which is necessary when any name contains
anything
other
than letters, numbers, and underscores:
Forms![frm NewPatientEntry]![fsub nursedatesview].Form.Requery
It is best to avoid anything other than letters, numbers, and
underscores in
any names.- Hide quoted text -
- Show quoted text -
Thank you so much. That fixed it. It looks great. The only other
problem I see is that on my main form when I go from one record to
the
next the data entry form to add into does not remain blank. It shows
all the entries made into it. It only shows blank the first time I
open the data base. If we tab off after adding a record a blank line
does appear as it should. But if I advance to the next record my
data
entry form does not remain blank.- Hide quoted text -
- Show quoted text -
I figured out what I did. I must have taken it off single form. So
now I only see the one record added. However, when I tab off the
field like you mentioned it doesnt go to a new record. How do I make
that happen?- Hide quoted text -
- Show quoted text -
I tried that and its not working.- Hide quoted text -
- Show quoted text -

I just replied with a long message but it doesn't seem to be posting.
So I am going to shorten my response in case it just takes a while.
But everything you told me to do is done and does work fine the first
time I open the Main form that this is located on. I can view my
entry just fine and it updates just fine. The problem is when I
advance the main form to the next record. That is when the subform
"add" no longer shows a blank line. It shows the last entry I made on
that particular record. The blank line only appears the first time
the database is open. The main form has its own set
...

read more »- Hide quoted text -

- Show quoted text -

I did not have a relationship but I created one and everything works
fine with that even before I created it. Like I mentioned, the only
problem I have is the subform where I add a new record which is set to
single form will not remain blank when I switch from record to record
of the main form. I think I might have to figure out a different
route since this doesn't seem to want to work for me. I appreciate
the time you spent giving me guidance.
 
L

Lisa 1022

What are the subform control's Link Parent and Link Child properties?  If
you do not understand the question, which I described in more detail in my
previous posting, say so and I will explain more fully.  With this property
not set you would get the behavior you describe, as I understand it from
what you have written.

The relationship is to create the link between the main form record and the
related subform records.  You probably have an employee record in a database
somewhere, then there are related records for each paycheck.  If those two
tables are not related there is no way to associate a paycheck record with
your employee record.  The interface may have looked OK, but I don't see how
the database could have worked.


Is there a link (relationship) between the main form's record source and
the
subform's record source? If so, are the Link Child and Link Parent
properties of the subform control (the "box" on the main form containing
the
subform) set to the linking field?
"Lisa" <[email protected]> wrote in message
On Apr 29, 6:54 am, "BruceM" <bamoob_at_yawhodotcalm.not> wrote:
To confirm, please confirm that the form in question:
1) Has the Data Entry property set to Yes
2) Has the Cycle Property set to All Records
3) Has Allow Additions set to Yes
If so, what happens when you press the Tab key after completing record
entry? If you keep pressing it, does it go to another record eventually?
If so, click View >> Tab Order and set the Tab Order so that using the
Tab
key sends the user from one control to the other in an order that makes
sense, or according to the left-to-right arrangement of the controls on
the
form, so that the last control to receive data is the last in the list.
On Apr 28, 1:40 pm, "BruceM" <bamoob_at_yawhodotcalm.not> wrote:
Start by making sure the form's Cycle property is set to All Records.
On Apr 28, 12:13 pm, "BruceM" <bamoob_at_yawhodotcalm.not> wrote:
On Apr 28, 10:46 am, "BruceM" <bamoob_at_yawhodotcalm.not> wrote:
Is the form open, and are you absolutely sure everything is
spelled
correctly?
On Apr 28, 6:03 am, "BruceM" <bamoob_at_yawhodotcalm.not> wrote:
What error is that?
On Apr 27, 2:29 pm, "BruceM" <bamoob_at_yawhodotcalm.not>
wrote:
One thing you can do is to make a single form with its Data
Entry
property
set to Yes. This means it can by used only for adding
records,
and
for
viewing records added in the current session. You can
prevent
record
navigation for the most part by removing the navigation
buttons.
I
will
call this form sfrmAdd.
Copy sfrmAdd as sfrmView. Change the Default View to
Continuous,
and
Data
Entry to No. You can set Allow Additions to No to prevent
using
this
form
to add new records, and to avoid the blank row that normally
appears
on
a
continuous form. Set Allow Edits and Allow Deletions as
needed
for
your
situation. Make it tall enough to show several records.
Add sfrmAdd as a subform, and sfrmView as another subform
just
below
it.
I
will call the subform controls (the "boxes" in which the
subforms
are
contained on the form) fsubAdd and fsubView. You can size
the
subforms
so
they look like one continuous form, particularly if neither
has
a
border.
sfrmAdd can have the table as its Record Source. sfrmAdd can
have
a
query
based on the table as its Record Source, sorted as you would
like.
In
the
After Update event of sfrmAdd:
Forms!MainFormName!fsubView.Form.Requery
When I have done this I have the users tab out of the last
field
to go
to
a
new record, but you could use a command button if you
prefer.
In
any
case,
requery in the After Update event as described. The
just-added
item in
sfrmAdd will show up in the continuous form.
On Apr 27, 12:41 pm, "BruceM" <bamoob_at_yawhodotcalm.not>
wrote:
They should not be entering data directly into a table.
That's
what
forms
are for. In a table there is no way to do what you seek..
In
a
form
there
are a number of options, including seeing just one record
at
a
time.

Is it possible to have the first row of a table show the
"blank
record
line" instead of the first record. That way when people
enter
into
that table they don't have to scroll down to the end to
insert
a
new
entry into the table.- Hide quoted text -
- Show quoted text -
Sorry I wasn't clear. That table is a subform on a form. So
when
they open the form and find that table to enter data intoI
want
the
first line blank so they don't have to scroll to the bottom.
Otherwise, there are daily entries they have to scroll
through
to
get
to the bottom of the table. W- Hide quoted text -
- Show quoted text -
Great suggestion Bruce. There are so many tricks to learn in
Access.
I followed every step and the only problem I have is the after
update
event. Here is the code and it does not work. The
frm_NewPatientEntry is the main form where the
fsub_nursedatesview
is
located. Is this correct? Did I miss something? When I makean
entry now I get an error after I tab out of the field.
Forms!frm_NewPatientEntry!fsub_nursedatesview.Form.Requery-
Hide
quoted
text -
- Show quoted text -
It says it can't find the form name.- Hide quoted text -
- Show quoted text -
Yes. The main form I am using has both subforms on it. The
dataeentry form and the view form. The main form is called frm
NewPatientEntry. There is no underscore in the actual name but I
had
to add it in the code. I even changed the name of the main formto
the data entry form thinking I was supposed to use that form and I
get
the same error. It can't find the form name. Any ideas?
If there is no underscore in the actual name but there is an
underscore
in
the code then the names are not exactly the same, and the code
cannot
work.
You need to rename the form, or you can enclose the *actual* form
name
in
square brackets, which is necessary when any name contains
anything
other
than letters, numbers, and underscores:
Forms![frm NewPatientEntry]![fsub nursedatesview].Form.Requery
It is best to avoid anything other than letters, numbers, and
underscores in
any names.- Hide quoted text -

...

read more »- Hide quoted text -

- Show quoted text -

I do understand what you are saying. I am just getting frustrated.
The main form record source is qry_demographics. The subform record
source is qry_nursedates. The child link is to patient number and so
is the master link. The relationship is from the tble_demographics
patient number to the tbl_nurse dates patient number and it shows as a
one to many. When I look at the table of the nurse dates it shows all
my entries with the corresponding patient number. So every nurse date
is associated with a record in demographics table by their patient
number.
 
B

BruceM

Just to be clear, you have this, as I understand:

tbl_demographics
PatientID
FirstName
etc.

tbl_nurse
VisitID (PK)
PatientID (linking field)
VisitDate
etc.

Whatever the field names, the tables are linked by PatientID, one-to-many
from tbl_demographics to tbl_nurse.

qry_demographics is based on tbl_demographics, and qry_nurse is based on
tbl_nurse. Both queries include PatientID.

You have a main form based on qry_demographics, with a subform based on
qry_nurse. The Link Parent and Link Child properties of the subform control
is PatientID for both.

The subform is a single form (not continuous or datasheet) based on
qry_Nurse. It's Data Entry Property is Yes, as is Allow Additions. It's
Cycle property is set to All Records.

When you enter a new record via the subform, then press the tab key (maybe
several times, depending on the tab order), you just stay at the new subform
record.

When you go to a new main form record, you see an existing subform record.
That record is related to the current main form record as it should be, but
you are expecting a blank for entering a new subform record.

If all of this is true, please confirm. If not, please respond inline.

If it is all true, you could try this in the main form's Current event:

Me.SubformControlname.Form.Recordset.AddNew


What are the subform control's Link Parent and Link Child properties? If
you do not understand the question, which I described in more detail in my
previous posting, say so and I will explain more fully. With this property
not set you would get the behavior you describe, as I understand it from
what you have written.

The relationship is to create the link between the main form record and
the
related subform records. You probably have an employee record in a
database
somewhere, then there are related records for each paycheck. If those two
tables are not related there is no way to associate a paycheck record with
your employee record. The interface may have looked OK, but I don't see
how
the database could have worked.


Is there a link (relationship) between the main form's record source and
the
subform's record source? If so, are the Link Child and Link Parent
properties of the subform control (the "box" on the main form containing
the
subform) set to the linking field?
"Lisa" <[email protected]> wrote in message
On Apr 29, 6:54 am, "BruceM" <bamoob_at_yawhodotcalm.not> wrote:
To confirm, please confirm that the form in question:
1) Has the Data Entry property set to Yes
2) Has the Cycle Property set to All Records
3) Has Allow Additions set to Yes
If so, what happens when you press the Tab key after completing record
entry? If you keep pressing it, does it go to another record
eventually?
If so, click View >> Tab Order and set the Tab Order so that using the
Tab
key sends the user from one control to the other in an order that
makes
sense, or according to the left-to-right arrangement of the controls
on
the
form, so that the last control to receive data is the last in the
list.
On Apr 28, 1:40 pm, "BruceM" <bamoob_at_yawhodotcalm.not> wrote:
Start by making sure the form's Cycle property is set to All
Records.
On Apr 28, 12:13 pm, "BruceM" <bamoob_at_yawhodotcalm.not> wrote:
On Apr 28, 10:46 am, "BruceM" <bamoob_at_yawhodotcalm.not>
wrote:
Is the form open, and are you absolutely sure everything is
spelled
correctly?
On Apr 28, 6:03 am, "BruceM" <bamoob_at_yawhodotcalm.not>
wrote:
What error is that?
On Apr 27, 2:29 pm, "BruceM" <bamoob_at_yawhodotcalm.not>
wrote:
One thing you can do is to make a single form with its
Data
Entry
property
set to Yes. This means it can by used only for adding
records,
and
for
viewing records added in the current session. You can
prevent
record
navigation for the most part by removing the navigation
buttons.
I
will
call this form sfrmAdd.
Copy sfrmAdd as sfrmView. Change the Default View to
Continuous,
and
Data
Entry to No. You can set Allow Additions to No to prevent
using
this
form
to add new records, and to avoid the blank row that
normally
appears
on
a
continuous form. Set Allow Edits and Allow Deletions as
needed
for
your
situation. Make it tall enough to show several records.
Add sfrmAdd as a subform, and sfrmView as another subform
just
below
it.
I
will call the subform controls (the "boxes" in which the
subforms
are
contained on the form) fsubAdd and fsubView. You can size
the
subforms
so
they look like one continuous form, particularly if
neither
has
a
border.
sfrmAdd can have the table as its Record Source. sfrmAdd
can
have
a
query
based on the table as its Record Source, sorted as you
would
like.
In
the
After Update event of sfrmAdd:
Forms!MainFormName!fsubView.Form.Requery
When I have done this I have the users tab out of the last
field
to go
to
a
new record, but you could use a command button if you
prefer.
In
any
case,
requery in the After Update event as described. The
just-added
item in
sfrmAdd will show up in the continuous form.
On Apr 27, 12:41 pm, "BruceM" <bamoob_at_yawhodotcalm.not>
wrote:
They should not be entering data directly into a table.
That's
what
forms
are for. In a table there is no way to do what you seek.
In
a
form
there
are a number of options, including seeing just one
record
at
a
time.

Is it possible to have the first row of a table show
the
"blank
record
line" instead of the first record. That way when
people
enter
into
that table they don't have to scroll down to the end
to
insert
a
new
entry into the table.- Hide quoted text -
- Show quoted text -
Sorry I wasn't clear. That table is a subform on a form.
So
when
they open the form and find that table to enter data into
I
want
the
first line blank so they don't have to scroll to the
bottom.
Otherwise, there are daily entries they have to scroll
through
to
get
to the bottom of the table. W- Hide quoted text -
- Show quoted text -
Great suggestion Bruce. There are so many tricks to learn in
Access.
I followed every step and the only problem I have is the
after
update
event. Here is the code and it does not work. The
frm_NewPatientEntry is the main form where the
fsub_nursedatesview
is
located. Is this correct? Did I miss something? When I make
an
entry now I get an error after I tab out of the field.
Forms!frm_NewPatientEntry!fsub_nursedatesview.Form.Requery-
Hide
quoted
text -
- Show quoted text -
It says it can't find the form name.- Hide quoted text -
- Show quoted text -
Yes. The main form I am using has both subforms on it. The
dataeentry form and the view form. The main form is called frm
NewPatientEntry. There is no underscore in the actual name but I
had
to add it in the code. I even changed the name of the main form
to
the data entry form thinking I was supposed to use that form and
I
get
the same error. It can't find the form name. Any ideas?
If there is no underscore in the actual name but there is an
underscore
in
the code then the names are not exactly the same, and the code
cannot
work.
You need to rename the form, or you can enclose the *actual*
form
name
in
square brackets, which is necessary when any name contains
anything
other
than letters, numbers, and underscores:
Forms![frm NewPatientEntry]![fsub nursedatesview].Form.Requery
It is best to avoid anything other than letters, numbers, and
underscores in
any names.- Hide quoted text -

...

read more »- Hide quoted text -

- Show quoted text -

I do understand what you are saying. I am just getting frustrated.
The main form record source is qry_demographics. The subform record
source is qry_nursedates. The child link is to patient number and so
is the master link. The relationship is from the tble_demographics
patient number to the tbl_nurse dates patient number and it shows as a
one to many. When I look at the table of the nurse dates it shows all
my entries with the corresponding patient number. So every nurse date
is associated with a record in demographics table by their patient
number.
 
L

Lisa 1022

Just to be clear, you have this, as I understand:

tbl_demographics
    PatientID
    FirstName
    etc.

tbl_nurse
    VisitID (PK)
    PatientID (linking field)
    VisitDate
    etc.

Whatever the field names, the tables are linked by PatientID, one-to-many
from tbl_demographics to tbl_nurse.

qry_demographics is based on tbl_demographics, and qry_nurse is based on
tbl_nurse.  Both queries include PatientID.

You have a main form based on qry_demographics, with a subform based on
qry_nurse.  The Link Parent and Link Child properties of the subform control
is PatientID for both.

The subform is a single form (not continuous or datasheet) based on
qry_Nurse.  It's Data Entry Property is Yes, as is Allow Additions.  It's
Cycle property is set to All Records.

When you enter a new record via the subform, then press the tab key (maybe
several times, depending on the tab order), you just stay at the new subform
record.

When you go to a new main form record, you see an existing subform record..
That record is related to the current main form record as it should be, but
you are expecting a blank for entering a new subform record.

If all of this is true, please confirm.  If not, please respond inline.

If it is all true, you could try this in the main form's Current event:

Me.SubformControlname.Form.Recordset.AddNew







...

read more »- Hide quoted text -

- Show quoted text -

Well....that was it. OMG. It works perfectly now. I entered that
code on the form's current event. Thank you so much for sticking with
me. Obviously, I still have a lot to learn. Thank you again.
 
B

BruceM

Glad to help. Does it work correctly when you tab off of a record in the
subform? Does it go to a new record?

Just to be clear, you have this, as I understand:

tbl_demographics
PatientID
FirstName
etc.

tbl_nurse
VisitID (PK)
PatientID (linking field)
VisitDate
etc.

Whatever the field names, the tables are linked by PatientID, one-to-many
from tbl_demographics to tbl_nurse.

qry_demographics is based on tbl_demographics, and qry_nurse is based on
tbl_nurse. Both queries include PatientID.

You have a main form based on qry_demographics, with a subform based on
qry_nurse. The Link Parent and Link Child properties of the subform
control
is PatientID for both.

The subform is a single form (not continuous or datasheet) based on
qry_Nurse. It's Data Entry Property is Yes, as is Allow Additions. It's
Cycle property is set to All Records.

When you enter a new record via the subform, then press the tab key (maybe
several times, depending on the tab order), you just stay at the new
subform
record.

When you go to a new main form record, you see an existing subform record.
That record is related to the current main form record as it should be,
but
you are expecting a blank for entering a new subform record.

If all of this is true, please confirm. If not, please respond inline.

If it is all true, you could try this in the main form's Current event:

Me.SubformControlname.Form.Recordset.AddNew







...

read more »- Hide quoted text -

- Show quoted text -

Well....that was it. OMG. It works perfectly now. I entered that
code on the form's current event. Thank you so much for sticking with
me. Obviously, I still have a lot to learn. Thank you again.
 
L

Lisa 1022

Glad to help.  Does it work correctly when you tab off of a record in the
subform?  Does it go to a new record?













...

read more »- Hide quoted text -

- Show quoted text -

Yes it does. I can make several entries on the subform and it moves
them down to the view subform and leaves me a blank line for the next
record. When I leave the main form now and come back, that blank line
is there for a new entry. Thanks again for your time and patience!!
 
B

BruceM

You're welcome. Just repaying in kind the help I have received here.

Glad to help. Does it work correctly when you tab off of a record in the
subform? Does it go to a new record?













...

read more »- Hide quoted text -

- Show quoted text -

Yes it does. I can make several entries on the subform and it moves
them down to the view subform and leaves me a blank line for the next
record. When I leave the main form now and come back, that blank line
is there for a new entry. Thanks again for your time and patience!!
 

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

Top