Re: subform issue
- From: "tina" <nospam@xxxxxxxxxxx>
- Date: Wed, 03 Dec 2008 03:46:49 GMT
okay, well, a couple things. first of all
In one of the tables (orders), there is a city code that is NOT partcreated.
of the form but should automatically update when the new record is
It's not updating that field. I made it a lookup field
let's stop here. if you are saying that you have a Lookup field in
tblOrders - in the table itself, not a combobox control in a form - then i'd
recommend you stop immediately and get rid of that Lookup in the table. back
up your database (or at least back up tblOrders); then open tblOrders in
Design view, go to the city code field, click the Lookup tab in Field
Properties, and change the Display Control setting to TextBox. save and
close the table. Lookup fields in tables are bad news; for more information,
see http://www.mvps.org/access/lookupfields.htm.
second, i assume that each order in tblOrders is linked to a specific
customer. and if i understood you correctly, each customer is linked to a
specific city code. if that's correct, what is your business reason for
storing a city code in each order record, when orders and city codes are
already indirectly linked via customers?
hth
"Patttt" <Patttt@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3E254809-389A-4A32-8543-567CF34173E6@xxxxxxxxxxxxxxxx
Me too! However, now I have a new issue (of course). When one enters a newpart
order using the form we've been working on, the data populates a couple of
tables. In one of the tables (orders), there is a city code that is NOT
of the form but should automatically update when the new record iscreated.
It's not updating that field. I made it a lookup field that has itidentify
the city code based on the customer name in the customer table (they'reI
related tables) but it's still not updating. Can the table be designed to
enter the info on its own? Thanks again for any help.
"tina" wrote:
you're welcome, glad it worked for you! :)
"Patttt" <Patttt@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D6AD3B1C-7C42-49CA-A1EC-B6CB7224794A@xxxxxxxxxxxxxxxx
Hi Tina,
I just wanted to let you know that your expertise was a terrific help!
tblOrderDetails.fixed the problem - everything is running smoothly. You're the best!subform
Pat
"tina" wrote:
well, in the subform, i'd get rid of the two-table query. bind the
to tblOrderDetails, or to a query that includes only
inmake
LinkChildFieldssure the subform is linked to the mainform, by setting the
property to OrderID (which refers to the OrderID foreign key field
OrderIDtblOrderDetails) and setting the LinkMasterFields property to
subform,(which
refers to the OrderID primary key field in tblOrders).
if you want to see/choose products by name, in the OrderDetails
setthen add a combobox control in the subform, with the ControlSource
SQLto
the ProductID field in tblOrderDetails, and the RowSource set to a
correctlyColumnCountstatement based on tblProducts, something like
SELECT ProductID, ProductName FROM tblProducts ORDER BY ProductName;
set the combobox control's BoundColumn to 1 (the default), the
to 2, and the ColumnWidths to 0";2" so the ProductID will be
opencontrolstored in the ProductID field in tblOrderDetails, but the combobox
in the subform with *display* the product name, not the id.
hth
"Patttt" <Patttt@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:0EB51FEA-911F-4F0B-A035-845ED84D4A0B@xxxxxxxxxxxxxxxx
The subform is based on a query that does contain my data when I
isthe
query. It's based on 2 tables that have primary key/ foreign key
relationships. The query contains a field called "product id" that
somethe
primary key one of the tables. However, an early designer added
butcode
(anotherthat replaces the product id number with the name of the product
table that is also related). I had it working once in the subform,
Detailsit
don'tonly displayed the product id code - not the product name. Now, I
have
any entries in the subform at all. To answer your questions:
1. the mainform is bound to the Orders table
2. Order Id is the primary key of Orders
3. The subform is bound to a query based on Orders and Order
displaytables.
the tables are related on the Order ID field.subform).
4. Order ID from Order is part of the query (not displayed in the
Order ID is part of the main form and displayed on the main form.
Thanks so much for your help! For some reason, the query DOES
thethe
records, but the subform doesn't AND we can't add anything new via
tablequery
or the subform. Pat
"tina" wrote:
you need to go back and look at the tables/relationships. what
whatis
bound to the mainform? what is that table's primary key field?
fieldtable is
bound to the subform? does that table contain a foreign key
thatthat
links
back to the primary key field of the first table? if yes, is
anprimaryforeign
key field included in the RecordSource of the subform? is the
mainform?key
field of the first table included in the RecordSource of the
hth
"Patttt" <Patttt@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:53FCC2A7-3347-46FE-B756-621215A92E34@xxxxxxxxxxxxxxxx
nope....that didn't fix it. I did notice, though, that I have
ideaerror
Detailsmessage on the status bar that says "join key of table Order
not
in
record set" when I try to add a new record. I don't have any
I'llwhere to
go
to fix it!
"Patttt" wrote:
"Allow Additions" says yes, although "Data Entry" says no.
settry
changing
that one. thanks!
"Brian" wrote:
Check your subform's AllowAdditions property. Did it get
doesto
data? IFalse
somehow?
"Patttt" wrote:
Is there a reason why a subform won't let you enter new
can
enter new
data in the main form section just fine. The subform
onhave
the
dropdown
list that displays the correct choices, but when I click
subformone
of
them,
nothing is entered in the field. Essentially, the
youronly
tablesdisplays the
existing data but won't let you enter new records. The
ARE
related, so
it's not a relationship issue. any thoughts? Thanks for
help!
Pat
.
- Follow-Ups:
- Re: subform issue
- From: Patttt
- Re: subform issue
- References:
- Re: subform issue
- From: Patttt
- Re: subform issue
- From: tina
- Re: subform issue
- From: Patttt
- Re: subform issue
- Prev by Date: Second Sales Tax Field
- Next by Date: a banner for new shop sale/make vintage jewlery
- Previous by thread: Re: subform issue
- Next by thread: Re: subform issue
- Index(es):
Relevant Pages
|