By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,490 Members | 892 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,490 IT Pros & Developers. It's quick & easy.

Can't get information to display in a lable control on one form from another.

P: n/a
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” which I believe was created using
Visual Basic, not standard Access. 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 after a registration is
completed. 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 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 as it should.

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

I have three forms; two with tables and one (unbound) display form with
a data Grid that graphically start to end-date in a bar graphic:

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 the
listing of 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 the command button, you are immediately taken to the
scheduling data Grid (frmMain).

Whatever name you had selected before pressing the command button,
above, should now appear in the, label control, “lblCurrStat” on the,
“frmMain form below along with the graphically depicted corresponding
date range in the Grid in the form of a bar graph.

3. Form: frmMain
Table: unbound

Form is used to graphically display the registrant’s start to end-date,
just made from the form, “frmStatus”, in frmMain form and the data 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 corresponding with
the bar graph.

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 refresh 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

To show that it “should” work; all I have to do is change the
“Column(1)” number. The information in the, “lblCurrStat”label control
on the, “frmMain” form will change as a result, but only on old entries.


*** Sent via Developersdex http://www.developersdex.com ***
May 2 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"John Phelan-Cummings" <jp*********@hotmail.com> wrote
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.
Why _should_ it? What you describe is not a feature or function of Access --
it is something that would have to be accomplished by programming. So the
question would be: _what_, if anything, have you implemented to make the
name be automatically displayed on another form.
I have a scheduling program that I am working
on. Included in the application program is a data
"GRID" which I believe was created using
Visual Basic, not standard Access. 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 after
a registration is completed. 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 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 as it should.


Now, as I understand it, you have obtained/purchased/licensed a third-party
product, a grid, intended for VB and are using it in Access? And, it is
that third-party product (ActiveX control?) that isn't working as you expect
it to?

There are many grids available, most of them intended for use with VB, or
C++, or Delphi, or some other languages; most of them are also untested with
Access, and whether they will or will not work is just a "hit or miss"
proposition. If you don't state the name of the third-party product (grid),
your chances of finding someone who has happened to have tried it with
Access are near zero. If you do, you may not have much luck, because Access
has datasheet view, and continuous forms view, which have most of the
functionality of many "grids", and because they are parts of Access, and
thus not-extra-cost, are used by most Access developers.

My suggestion is that you likely need to take your question to the author /
vendor of the third-party product, if (as I infer) it is the third-party
product that has the problem.

Larry Linson
Microsoft Access MVP

May 6 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.