Label will not display NEW records frm another (bound) form.

G

Guest

When I add the name of a new individual in a, bound form, it will not display
that person’s name in a label control of a second unbound form.

I have a scheduling program that I am working on. Included in the
application program is a data “GRIDâ€. Its purpose is to display the results
of a range of “from-to-dates†of registrations for different clients. The
difficulty that I am having is in displaying new registrant names in a
display label of a second form when it’s GRID is immediately accessed via a
command button. The display label works just fine for existing entries that
came with the data GRID module that I previously purchased. It’s just when I
try to add NEW entries that I the label control will not work/refresh.
However, other than the names of new entries not appearing in the label
control, the range of start to end-date for these entries, created in the
first form, does display in the GRID of the second form.

The following is a description of how everything is supposed to work:

I have three forms; two with tables and one (unbound) display form:

1. Form: frmGuest (label name: fsubGuest)
Table: tblGuest
Field: GuestID (label name: cboGuestID) which holds the registered name

This form is used to create individual records/accounts for future
registrations and list
past Registrations.


2. Form: frmStatus
Table: tblstatus

Form is used to create registration schedules for individuals pulled from
the above form, “frmGuest†and table, “tblGuestâ€. You normally would select
a name from a combo box on this, “frmStatusâ€, form along with selecting the
appropriate start and end-dates.

This form contains a command button for accessing the data Grid for viewing
results of the date range for an appointment just created. .

When you press a command button, you are immediately taken to the scheduling
data Grid (frmMain).

Whatever name you had selected before pressing the command button, above,
will now appear in the, label control, “lblCurrStat†on the, “frmMain form
below along with the corresponding date in the Grid.

3. Form: frmMain
Table: unbound

Form is used to display registrations, made from the form, “frmStatusâ€, in a
GRID.

The form, “frmMain†contains the label control, “lblCurrStat†that displays
the name of an individual selected in the, “frmStatus†form along with a
couple of other pieces of information.

Again, all the above will work, except ONLY WITH EXISTING registrations, but
not new ones. When you add the name of a new individual in the form (along
with a couple of pieces of information), “frmGuest†and table, “tblGuestâ€
described above, it will not display that person’s name in the label control,
“lblCurrStat†located on the, “frmMain†form. However, the date range for
the registration does show up in the data GRID of the same form.

Here is a portion of the Module, "basGrid" that I use to reference the label
control, "lblCurrStat" located on the, “frmMain†Grid form that is supposed
to be refreshed with the registrants name and other information:

With frmS

frmM!lblCurrStat.Caption = !cboGuestID.Column(1) & vbCrLf & _
!cboUnitID & vbCrLf & _
!cboStatusType.Column(1)
End With
ExitLine:
Exit Sub
End Sub
 
M

Marshall Barton

John said:
When I add the name of a new individual in a, bound form, it will not display
that person’s name in a label control of a second unbound form.

I have a scheduling program that I am working on. Included in the
application program is a data “GRID”. Its purpose is to display the results
of a range of “from-to-dates” of registrations for different clients. The
difficulty that I am having is in displaying new registrant names in a
display label of a second form when it’s GRID is immediately accessed via a
command button. The display label works just fine for existing entries that
came with the data GRID module that I previously purchased. It’s just when I
try to add NEW entries that I the label control will not work/refresh.
However, other than the names of new entries not appearing in the label
control, the range of start to end-date for these entries, created in the
first form, does display in the GRID of the second form.

The following is a description of how everything is supposed to work:

I have three forms; two with tables and one (unbound) display form:

1. Form: frmGuest (label name: fsubGuest)
Table: tblGuest
Field: GuestID (label name: cboGuestID) which holds the registered name

This form is used to create individual records/accounts for future
registrations and list
past Registrations.


2. Form: frmStatus
Table: tblstatus

Form is used to create registration schedules for individuals pulled from
the above form, “frmGuest” and table, “tblGuest”. You normally would select
a name from a combo box on this, “frmStatus”, form along with selecting the
appropriate start and end-dates.

This form contains a command button for accessing the data Grid for viewing
results of the date range for an appointment just created. .

When you press a command button, you are immediately taken to the scheduling
data Grid (frmMain).

Whatever name you had selected before pressing the command button, above,
will now appear in the, label control, “lblCurrStat” on the, “frmMain form
below along with the corresponding date in the Grid.

3. Form: frmMain
Table: unbound

Form is used to display registrations, made from the form, “frmStatus”, in a
GRID.

The form, “frmMain” contains the label control, “lblCurrStat” that displays
the name of an individual selected in the, “frmStatus” form along with a
couple of other pieces of information.

Again, all the above will work, except ONLY WITH EXISTING registrations, but
not new ones. When you add the name of a new individual in the form (along
with a couple of pieces of information), “frmGuest” and table, “tblGuest”
described above, it will not display that person’s name in the label control,
“lblCurrStat” located on the, “frmMain” form. However, the date range for
the registration does show up in the data GRID of the same form.

Here is a portion of the Module, "basGrid" that I use to reference the label
control, "lblCurrStat" located on the, “frmMain” Grid form that is supposed
to be refreshed with the registrants name and other information:

With frmS

frmM!lblCurrStat.Caption = !cboGuestID.Column(1) & vbCrLf & _
!cboUnitID & vbCrLf & _
!cboStatusType.Column(1)
End With
ExitLine:
Exit Sub
End Sub


You may have lost me somewhere in there. You keep
emphasizing the word GRID, which implies that you are doing
something non-standard (e.g. using a non-Access data grid
control), but I don't see why it's important to how you
display what you're asking about.

tt sounds like the main form is not saving the record before
shifting the focus to the other form (HOW? Is it a subform
or a separate form?). Try adding:
Me.Dirty = False
at the top of the button's Click event.
 
G

Guest

I havn't tried your suggestion yet. However, yes i hd the sme thought, but
everything is being saved. I looked into the tables; I can see the recorded
record.

John
 
G

Guest

Absolutely nothing happens when I inserted, "Me.Dirty = False" in either save
button or the button that is supposed open the GRID form.

The GRID form was written in Visual Basic. I could never figure out how to
make Access use a Pivot chart work like a GANT chart.

John
 
G

Guest

Do you work for MS? I used code that's supposed to work in Access. Is this
what I waisted a whole day to hear, " I can't help you with some VB
thingie..."?

hphelan

Barton said:
Sorry, I can't help you with some VB thingie I have never
used.
--
Marsh
MVP [MS Access]


John said:
Absolutely nothing happens when I inserted, "Me.Dirty = False" in either save
button or the button that is supposed open the GRID form.

The GRID form was written in Visual Basic. I could never figure out how to
make Access use a Pivot chart work like a GANT chart.
 
M

Marshall Barton

Sorry, but I thought you were probably using standard Access
features and just needed a nudge in the right direction.
Apparently I was wrong

Is there anyone else out there that can help John?

While an MS support person drops in occasionally, these
newsgroups are just some folks trying to help other folks
when they think they can.

If someone that has used the VB control(?) doesn't jump in
with a good answer, I suggest that you try starting a new
thread and I will be sure to stay out of your way.
 
G

Guest

My appologies. I thought because of the means of getting to this group that
it was strictly a MS supported group. While I am using standard Access; the
code that I am using was part of an application that was written in VB. It's
the only part of the code that doesn't seem to be working. I was told that
it would work in standard Access.

John


Marshall Barton said:
Sorry, but I thought you were probably using standard Access
features and just needed a nudge in the right direction.
Apparently I was wrong

Is there anyone else out there that can help John?

While an MS support person drops in occasionally, these
newsgroups are just some folks trying to help other folks
when they think they can.

If someone that has used the VB control(?) doesn't jump in
with a good answer, I suggest that you try starting a new
thread and I will be sure to stay out of your way.
--
Marsh
MVP [MS Access]


John said:
Do you work for MS? I used code that's supposed to work in Access. Is this
what I waisted a whole day to hear, " I can't help you with some VB
thingie..."?
 

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