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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert into tabbed form

Status
Not open for further replies.

livvie

Programmer
Apr 20, 2004
91
IE
I have a form with 2 tabs on it. Each tab has it's own form. Form on tab 2 is a datasheet with a select button on each line. Clicking this button populates the form on Tab 1. The problem I am having is that I cannot select multiple lines on Tab 2 at the same time. I can select one switch to tab 1 and it's there and then go back and select another. If I dont switch tabs I just overwrite the record there. I am using acNewRec but this obviously doesn't get activated until I switch tabs. I have tried requery but this doesn't work.
 
Wouldn't selecting multiple lines be selecting multiple records? Are you actually wanting to select more than one record at a time?

Stephen [infinity]
"Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me." John 14:6 KJV
 
Yes but it works fine if you change to the other tab in between
 
Hmm... would it be possible to fix with some sort of conditional statemtn, such as an If..Then or Select Case statement?

Stephen [infinity]
"Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me." John 14:6 KJV
 
You gave me an idea and this worked -
Forms!frmQuoteComplete!tabQuoteDets.Pages(0).SetFocus
Forms!frmQuoteComplete!tabQuoteDets.Pages(1).SetFocus
 
Cool.
Of couse, would you not be able to just code that part like this:
Code:
Page(0).SetFocus
Page(1).SetFocus
??

That is assuming the code is on the form level, and not in a separate module..

Stephen [infinity]
"Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me." John 14:6 KJV
 
well I do have another set of tabs on the form
 
Your pages should be named separately anyway. For example, if you creat 2 tab sets, the default values are Page1 and Page2 in Tab1 and Page3 and Page4 in Tab2.. So, as long as the names aren't identical for the tabs, it shouldn't be a problem. Either way, all that matters is that it works! [SMILE] Just thought it'd save a little space there.

Stephen [infinity]
"Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me." John 14:6 KJV
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top