Go Back   Cyber Tech Help Support Forums > Software > Applications

Notices

Reply
 
Topic Tools
  #1  
Old April 13th, 2006, 06:17 PM
gtfazer gtfazer is offline
New Member
 
Join Date: Apr 2006
Posts: 2
Data Access Page

I am attempting to set up a database in Access. I have my table set up with queries and forms for adding data. I want to have a data access page to view the data but I need a search function.
My table has 6500 records with 20 separate columns for various things. I need to be able to search directly from the data access page, with the easiest search function possible.
I have tried to setup a dropdown to select the last name, but i don't think that will work because I need to view every column when selected, not just one more. Can I set the dropdown to select a record, i.e. when the last name Adams is selected, all records with the shared last name will open.
Using the filter is too complex for my co-workers. The simpler the better. Thanks for any help.
Reply With Quote
  #2  
Old April 13th, 2006, 07:10 PM
oracle128's Avatar
oracle128 oracle128 is offline
Α Ω
 
Join Date: Oct 2000
O/S: Windows XP Pro
Location: Melbourne, Australia
Age: 24
Posts: 9,401
For the combo box's source, you could do:
Code:
combobox.RowSource = "SELECT DISTINCT [LastName] FROM [Customer Table];"
As for the code to display the records upon selection, you could easily select the results with:
Code:
"SELECT [FirstName],[LastName] FROM [Customer Table] WHERE [LastName]=" & [combobox] & ";"
but how to display it is a different matter, as you will need to display the result in a control that can show records at once (like a list box, another combo box, or by displaying it as static text).
__________________
Oracle's backup tutorial

"A lot of people say games are addictive. Well, they're addictive in the sense that anything you like doing you repeat endlessly. But no one would say, 'Mr Kasparov, you have a chess problem,' or 'Tiger Woods, you have a golf addiction.'" - Ian Livingstone, Creative Director, Eidos.

"A problem well stated is a problem half solved" - Charles Franklin Kettering
Reply With Quote
  #3  
Old April 13th, 2006, 07:25 PM
gtfazer gtfazer is offline
New Member
 
Join Date: Apr 2006
Posts: 2
alright, i am very new at access. would i create a page, then add that directly, or create a script to view it.
I have a form created that would be perfect to view the data, but i have no idea how to implement everything. I want the search to display all the records, but have an easy UI. After the search I want every record matching the last name field displayed. I want a search for either last name or case number. Any way to do this I am open to, I am just slightly familiar with access functions, having only started working with it on Monday, but that is all I have done since monday, so i have roughly 25 hours logged on it. Thank you.
Reply With Quote
  #4  
Old April 13th, 2006, 07:58 PM
oracle128's Avatar
oracle128 oracle128 is offline
Α Ω
 
Join Date: Oct 2000
O/S: Windows XP Pro
Location: Melbourne, Australia
Age: 24
Posts: 9,401
The code would need to be implemented with the Script Editor in the page's design view in access, which is essentially the Access Page equivalent of using Visual Basic for Applications (VBA) in Access Forms. My suggestion would be to implement everything you want in a Form first, then transfer that knowledge and code snippets to a data access form, since forms are easier to work with and debug. I also don't know a whole lot about data access pages, but have used forms/VBA extensively, so I could help you a lot better. Note also that the Script Editor isn't part of the default Office installation, so you may need to have your Office discs handy.

The meat of the code examples I gave were the SQL statements, which actually do the record searching work (for both giving dynamic search selections, and for searching through the database). Those statements will work in an Access form (with VBA), a data access page (with VB Script), or pretty much any other scripting language which can interact with databases.

Quote:
I want the search to display all the records, but have an easy UI.
As long as you don't need any further interaction with the search results after a search is performed, you could simply display them as static text.
__________________
Oracle's backup tutorial

"A lot of people say games are addictive. Well, they're addictive in the sense that anything you like doing you repeat endlessly. But no one would say, 'Mr Kasparov, you have a chess problem,' or 'Tiger Woods, you have a golf addiction.'" - Ian Livingstone, Creative Director, Eidos.

"A problem well stated is a problem half solved" - Charles Franklin Kettering

Last edited by oracle128; April 13th, 2006 at 08:02 PM.
Reply With Quote
Reply

Bookmarks

Topic Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:50 PM.

[ RSS ]