Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Runtime query on other computer beheves different

Runtime query on other computer beheves different

Runtime query on other computer beheves different

In my application in Access 2007 I have a form with a button. If I click on the button a report starts with a query which gets the record based on the ID which is dislayed on the form.
In normal access operation it works well. In runtime on my own computer it works well. If I run the program on a other computer (runtime) the program query prompts for the ID.
Complicated to test.

If I do not find the answer why this happens, I should like to have a work around to print e record which is active on a form (with a simple query attached to the report)

The query looks like:
SELECT Tankbeurten.Id, Tankbeurten.Datum, Tankbeurten.Klantnaam, Tankbeurten.Bootnaam, Tankbeurten.Thuishaven, Tankbeurten.Adres, Tankbeurten.Postcode, Tankbeurten.Woonplaats, Tankbeurten.Land, Tankbeurten.LitersBenzine1, Tankbeurten.LitersBenzine2, Tankbeurten.LitersBenzine3, Tankbeurten.LitersDiesel1, Tankbeurten.LitersDiesel2, Tankbeurten.LitersDiesel3, Tankbeurten.DieselDagPrijs, Tankbeurten.BenzineDagPrijs, Tankbeurten.Pompnummer2, Tankbeurten.Pompnummer1, Tankbeurten.Pompnummer3, Tankbeurten.TotaalBedrag, Tankbeurten.ToeslagFactor, Tankbeurten.[Te betalen], Tankbeurten.BTW, Tankbeurten.KasBedrag, Tankbeurten.PinBedrag, Tankbeurten.RekBedrag, Tankbeurten.Betalingsvorm, Tankbeurten.Afgesloten, Tankbeurten.Betaald, Tankbeurten.Boeknummer, Tankbeurten.Korting, Tankbeurten.Artikel
FROM Tankbeurten
WHERE (((Tankbeurten.Id)=[Formulieren]![Tanken]![ID]));

RE: Runtime query on other computer beheves different

What version are you using?
I would start by checking the options on both computers. In 2007-2010 look under Object Designers.
I would also check the size of the DB.

RE: Runtime query on other computer beheves different

That is not possible in a runtime version, I believe.

RE: Runtime query on other computer beheves different

I'm sorry, you did say you were using 2007. It's rather emotional around here because someone is retiring.

RE: Runtime query on other computer beheves different

Have you tried using the where condition of the DoCmd.OpenReport method? You would remove the where clause from the report's record source.

CODE --> vba

Dim strWhere as String
strWhere = "Id= " & Me.ID
DoCmd.OpenReport "Your Report Name", acViewPreview, , strWher 

Hook'D on Access
MS Access MVP

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close