Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Combo Box field within a subform

Author  Topic 

whill96205
Starting Member

46 Posts

Posted - 2004-07-14 : 15:41:18
I'm trying to duplicate a feature that's in the Northwind sample database. Main difference: Northwind is an actual Access database; I'm working on an Access Database Project (ADP).

Here's what I'd like to do. On my Orders form, I'd like to present data in a subform. This data will be provided form a table or a view (data from more than one table). The Northwind feature I would like to duplicate is: I would like to have the first column in this subform be a combo box whereby users could select a record from the subform's "unique table." Upon making a selection from the combo box, the rest of that row in the subform gets populated.

Works great in Northwind! (Northwind's subform has a query as a datasource.) How can I do this for myself, given that I'm using an ADP? I just don't know how to put all the appropriate parts together.

Thanks,
Whill

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2004-07-14 : 20:04:28

Access DP's are more fussy about these sorts of things. Rightly so - the data can easily become corrupted, especially given Access's track record on data integrity.
You might be able to get it working by fiddling the form settings, but I wouldn't recommend it. There are a couple of other options. The best one is to find some third-party data entry grid. There's loads out there on the web to choose from. The only thing is that they will all require more coding than a normal Access subform would require.
The other option is to use a temporary table for data entry, but has the potential to get very messy.

Tim
Go to Top of Page

whill96205
Starting Member

46 Posts

Posted - 2004-07-15 : 10:25:38
From one who has never done this kind of stuff before: why would temp tables get messy?
Go to Top of Page

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2004-07-18 : 19:39:21
They can be messy because the onus is on you as a developer to ensure that the data is:
populated correctly
validated
purged effectively etc etc

Go to Top of Page

whill96205
Starting Member

46 Posts

Posted - 2004-07-20 : 11:12:06
A temp table... Is that what is created when I use a subquery in, say, a regular query's FROM statement? I've tried that before, and I notice that SQL Server always presumes to assign some kind of table-like name to the subquery in the final SQL.

Go to Top of Page
   

- Advertisement -