MS Access
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Iron Speed
Go Back   Tutorialized ForumsDatabasesMS Access

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old December 23rd, 2007, 03:43 AM
tomisin tomisin is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Dec 2007
Posts: 1 tomisin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 37 sec
Reputation Power: 0
Using subform within a tabbed control

Please, I am trying to develop a form that has a tab control within it. one of the tab pages has a subform that is made visible when a user clicks on a search button. when a user clicks on the command button, the onclick event procedure is activated and the values from a combobox and textbox are used in executing a query which is used to set the recordsource property of the subform and displays the result.
I also needed to add additional tabs and the controls (textboxes) on those tabs and the main form retrieve their values from a field in one of the tables. I changed the recordsource property of the form to the table and my subform stopped working. the sourcecontrol property of the other fields are the names of the field within the table.
Please can anyone help in solving this problem.

2. I also want to include a command button on my subform to move to the next record after the result of the query is displayed on the subform.

3. Please how can I reference the record count property from the result of the query.

The code that is executed when the user clicks on the command button is shown below.

Private Sub cmandSearch_Click()
Dim GCriteria As String
'MsgBox (txtSearch)
If Len(cboSearch) = 0 Or IsNull(cboSearch) = True Then
MsgBox "You must select a field to search."

ElseIf Len(textSearch) = 0 Or IsNull(textSearch) = True Then
MsgBox "You must enter a search string."

Else

'Generate search criteria
GCriteria = cboSearch.Value & " LIKE '*" & textSearch & "*'"

'Filter Employees based on search criteria
Forms!frmSearch2!frmMemberSearch.Form.RecordSource = "select * from Members_Details where " & GCriteria
MsgBox (Forms!frmSearch2!frmMemberSearch.Form.RecordSourc e)

textSearch = ""

MsgBox "Results have been filtered."

End If

frmMemberSearch.Visible = True
end sub

Reply With Quote
Reply

Viewing: Tutorialized ForumsDatabasesMS Access > Using subform within a tabbed control


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway