Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Designing a Form to Allow Item to be Selected

Status
Not open for further replies.

jasonjthomas

IS-IT--Management
Jan 5, 2006
29
US
I have been trying to find a way to do this, but I multiple attempts at this have not worked.

I have created a form with a subform, and the subform is a datasheet. The problem I have is with the navigation of the main form. I have a client which is selectable via a dropdown box. The problem I have is suppose I perform a bunch of data entry on a client. If I don't save the record before I select a different client, all the data is saved to a different client.

What I would like to have happen is that the client is selectable in the combo box, and the other data components change to match the selected client. After that, an edit button needs to be clicked in order to edit the record. In other words, I want the client to be a selection, then once the appropriate client is selected I can then edit the appropriate data.

Does this make sense? I can add a bit more detail, but I have tried a couple of different ways to do this to no avail.

Thanks,
Jason


Jason J. Thomas

 
If I don't save the record before I select a different client, all the data is saved to a different client. [/quote

This doesn't sound good at all, and should not be happening, if you are set up right.

Assumptions :
Main form is client level info
Subform is many-level info to the client

So you select a client with the combo box (on the main form) and position to that record. The corresponding other fields are displayed on the main form. You change some data on the main form. You then RE-select a different client, and position to him, and your changes are saved to the second]/b] client. Is that what you are saying?

Does the subform have anything to do with this situation? Does it still happen if you take the subform out of the main form?

What is the rec source for the main form?



--------------------------------------
"For a successful technology, reality must take precedence over public relations, for Nature cannot be fooled." - Richard P. Feynman
 
if i understood your parent form and the subform arent linked the right way

because if it was then it shouldnt happen to save data to a different client please let me know whats the id thats links the 2 forms and if in the subform properties dose it show there
 
Sorry for the delays in my response, gentlemen, but my other priorities kept me away from this issue.

My database consists has the following setup
2 Tables:
tblClientSetup
tblReports
3 Lookup Tables
tlkpClients
tlkpPartner
tlkpDeliverables

tblClientSetup has the following configuration:
ClientSetupKey (Autonumber Primary Key)
ClientID (Lookup from tlkpClients)
PartnerName (Lookup from tlkpPartner)
YearEnd (Nothing here, given that YearEnd has not been clearly defined)

tblClientSetup has a 1-to-many relationship with tblReports, as one client has many reports. tblReports is as follows:
ReportsKey (Autonumber Primary Key)
ClientSetupKey (Link to tblClientSetup)
ReportName (Lookup from tlkpDeliverables)
Report Status (Yes/No Checkbox)
ReportComplete (Date/Time Record of when the report in question was done)

As I said, tblClientSetup has a 1-to-many relationship with tblReports. When I use the Form wizard to create my form, I decide to create a Form with a subform. I base my form on tblClientSetup. I also chose to make the subform a datasheet, based on the fields in tblReports.

So, based on this, how do I get to where I want to be as far as form design is concerned?

Jason

Jason J. Thomas

 
For me, the dropdown box used for client selection should be unbound.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
PHV:
So, in order to achieve what I want to do, my clientID selection should be an unbound control. Thus, everything else--including what's on the subform--would be connected to the record that is pulled up on that unbound control. Is that correct?

How would I do that, as I have to admit I don't know exactly how to do that.

Jason


Jason J. Thomas

 
Follow the combo wizard (3rd option).

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
I see what you mean now. This would appear to accomplish what I want it to do. I can select the list of available clients, and it shows everything about the client I select.

Just out of curiosity, if I wanted to display the Partner, would I make that a bound element?

Jason

Jason J. Thomas

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top