|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Database outpur to Crystal Reports
Hi
Hope you can help. I work for a charity called Flicks in the Sticks - I have a database in Access 2003 of all the films we are going to show for the next 12 months. Usually to make posters for a film, I get the Event ID number from a record in Access, I then go to Crystal Reports (9) and type in the Access Event ID number and up comes the relevant details to make a poster, image, film name, date etc. However, is it easy to create a form in Access with a button on it in Access, that will load the correct Poster Crystal Report for me? e.g. I just need to pass the Event ID no, and perhaps quantity of posters required, to Crystal. Sounds easy! But where might I start? Though not a newbie, I am no expert. Many thanks for any tips Ian |
|
#2
|
|||
|
|||
|
It shouldn't be too difficult. Sounds like all you would need to do is create a query based off of that number. You could have a form that has its record source with that query. Then just type in the number and get the results by clicking a button. The results would be in Access right, is that what you are after?
Here could be some code that would work when you push the button: Dim db as DAO.Database Dim qdf as DAO.QueryDef Dim num as integer Dim str as string Dim resmsg as String Dim total as string Set db = CurrentDb() Set qdf = db.QueryDefs("Insert name of query here") 'I will assume that the number is in a textbox called textbox1 num = textbox1.value 'Now create the SQL for the query str = "SELECT * FROM name of table here Where " resmsg = "Event_ID LIKE '*" & num & "*'" total = str & resmsg 'I used like instead of = just in case you dont know the 'exact number qdf.SQL = total DoCmd.OpenQuery "Name of Query", acViewNormal I hope this is what you had in mind. MAke sure that the Microsoft DAO 3.6 object library is selected. If you don't know how to do this just let me know. Good Luck theguz |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > Database outpur to Crystal Reports |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|