| View previous topic :: View next topic |
| Author |
Message |
twp Newbie

Joined: 16 Mar 2006 Posts: 2
|
Posted: Thu Mar 16, 2006 3:58 pm Post subject: get data into table |
|
|
hello all
sorry for this being silly question but i cant seam to find the answer anywhere
question 1
im setting up a small database for the company i work for the data base holds information on customers car details and invoice details im trying to create a view/form that when the car registration is entered it will show all corresponding results
from what ive read so far when you create a querie you set up the search perameters from the start but because the car reg will be unique to every single entery im not sure how this could be done?
question 2
also is it possible to point me in the right direction ive set up a spredsheet that will print to a preformatted invoice filling in details is there a way of having a simple one button operation of clicking print and then save inorder to get the relevent information into the relavent database fields?
thank you for any advice tp |
|
| Back to top |
|
 |
Seb33300 Power User

Joined: 07 Feb 2006 Posts: 63 Location: France
|
Posted: Fri Mar 17, 2006 4:26 am Post subject: |
|
|
I have a solution for your first question :
Create a new form using the wizard assistant on the table where the information of the cars are saved
When you form is done, create a new textbox, name it "txtsearch" and assing on the 'text changed' event this macro:
| Code: |
sub Filtre
oDoc = ThisComponent
oForm = oDoc.DrawPage.Forms.GetbyIndex(0)
strRech = oForm.GetByName("txtsearch").Text
oForm.Filter = """car_registration"" LIKE '*" & strRech & "*'"
oForm.ApplyFilter = True ' Filtrage
oForm.Reload
end sub
|
Note :
on the line | Code: | | oForm.Filter = """car_registration"" LIKE '*" & strRech & "*'" |
car_registration is the name of the field where is save this information
For your second question, I think that this should help you :
http://www.oooforum.org/forum/viewtopic.phtml?t=23117&start=15&postdays=0&postorder=asc&highlight=
you can generate a writer document then print it using
| Code: | | oReportDoc.print(array()) |
|
|
| Back to top |
|
 |
twp Newbie

Joined: 16 Mar 2006 Posts: 2
|
Posted: Fri Mar 17, 2006 10:00 am Post subject: |
|
|
| thank you very much for your help i thought it might be fairly straight forward but thats exxalant chears tim |
|
| Back to top |
|
 |
|