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

Form Problems

P: n/a
Hi everyone,

I've started a new topic so as not to get people confused. I apologise
for the number of posts i've put on here over the last few days - i
really am trying to learn this stuff but my brain is getting a bit
frazzled.

I have a form based on the table appointments with fields as below

AppointmentNo (primary key - autonumber)
OuterPostcode
CustomerName

In the form the OuterPostcode is selected from a combo box.
This populates a 2nd combo box with the customer details (name, address
etc)
Then I can make a selection from this combo box as to which customer
the appointment is for.

After this I have the fields from the table (customer name, address,
town etc) that should be populated from the selection in the 2nd combo.

All this works if my fields such as customer name are unbound. However
if they are unbound the results do not populate in the appointments
table! If they are bound to the table my form does not work as the
fields on the form populate with the last saved record from the form
and don't change even when I select another account in the combo box.

If anyone has any suggestions as to what I could try it'd be so
helpful. I have tried so many things but I know I'm doing something
basic wrong - just not clued up enough to work out what.

Thanks.

Dec 4 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"keri" <ke*********@diageo.comwrote
I've started a new topic so as not to get people
confused.

All this works if my fields such as customer name
are unbound. However if they are unbound the results
do not populate in the appointments table! If they are
bound to the table my form does not work as the
fields on the form populate with the last saved record
from the form and don't change even when I select
another account in the combo box.
Unfortunately, the immediately preceding paragraph has _me_ confused --
re-read this, as though you don't have the application in front of you to
look at. Then clarify so maybe we can follow what you are saying...

In an unbound Form (that is, one with no RecordSource), the data has to be
retrieved, the Controls populated, and re-saved to the Tables (but you may
employ a Query to do so) with your own code -- if you are using the unbound
Form to manipulate data. Many of us use unbound forms either only, or
primarily, for application navigation and control (e.g., choosing a date
range and opening a Report that uses the date range).

But, it is possible to "mix" an unbound form with a Combo Box that refers to
a RowSource, even though the ComboBox is itself not bound (that is, does not
have anything in its Control Source). But, populating other Controls based
on the selected value in the Combo is another job for your code.

If you are using bound Forms, and place the Combo Box in the Form's Header,
then the Wizard will guide you through using the Combo Box to select a
record to display. It _is_, and I repeat _is_, worth your while to invest
time and energy in learning how Access works so you can use bound Forms.
That will save you time, energy, and grief in the development process.

Larry Linson
Microsoft Access MVP
If anyone has any suggestions as to what I could try it'd be so
helpful. I have tried so many things but I know I'm doing something
basic wrong - just not clued up enough to work out what.

Thanks.

Dec 5 '06 #2

P: n/a
Thanks Larry. I genuinely am trying to understand Access and all of the
code that I am using but it's slow going! I'll try and explain more
clearly.

This is how it should work .... (I think).

I have a bound form (appointments) based on the table (appointments).

On the form I have an unbound combo box for users to select a customer
(it shows customer name, address, tel etc etc).
When they make a selection in this combo box the customer information
populates in the bound fields in the form (name, address etc),
therefore putting this information into the table when the record is
saved. (Is this correct?)

This is what is actually happening....

The problem I am having is that no matter what I select from the
unbound combo box in the form the bound fields (eg name, address, tel)
are not updating with the selection. Instead they are just showing the
details from the last saved record in the table.

If I change these fields to unbound they do show the selection from the
combo box however as they are unbound they do not populate the table.

(Hope that makes more sense). I can't work out what is wrong. I am sure
there will be a way around this happening, but I am also sure that I
have done something wrong in the design to make this happen. Therefore
I would prefer to work out my mistake and correct it rather than skirt
the problem.

Thanks

Dec 5 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.