Site Announcements

View the results of the New Wave Outpost 20th Anniversary Top Songs Poll here:
http://www.nwoutpost.com/poll/results


Coming Soon: Top Albums Poll. Stay tuned!

Welcome to the new forum!
If you are a previously registered user, you must do the following:

1) Click on 'I forgot my password' at the login prompt
2) Enter your username and email you registered with and submit
3) You will receive an email with an activation link. Please click it and then log in using the random password provided
4) Go to your User Control Panel and click on the Profile tab
5) Click on 'Edit Account Settings' and enter your new password twice followed by the random password provided earlier. Click Submit.
6) That's it...you're back in! You may have to log in again with your new password.


If you forgot your email address, please email me (MikeP) at: mikepaulsen12@gmail.com

Note: you must now use bb code buttons in the Post form for embedded images, YouTube videos, etc.
For example, to post embedded YouTube videos: paste in the link (e.g., http://www.youtube.com/watch?XYZ1234567), highlight it and then click the YouTube button.

MS Access Help Question

Reserved for off-topic posts.

MS Access Help Question

Postby Quite Life » Wed Jul 05, 2006 7:20 am

I'm opening a report from a form button using DoCmd.OpenReport. However, with the where clause is not right.

It needs to print up all the records in the report for a particular member ID. What's the syntax to point to the text boxes in both the form and the report. I need the correct syntax for that last part: DoCmd.OpenReport (formname), , , (field in report) = (field in form)

I tried
Dim stSQL as string
stSQL = "[MemeberID] = " & Me.MemberID
DoCmd.OpenReport "rptSomeReport", , , , , stSQL

with the MemberID is a string then:
stSQL = "[MemberID] = " & """" & Me.MemberID & """" (that's 4 double quotes in a row)

still comming up wrong
Quite Life
Room at the Top
 
Posts: 1029
Joined: Sat Apr 26, 2003 12:22 am
Location: USA

Postby SwampThing » Wed Jul 05, 2006 7:26 am

It's been years since I've done Access.

But Try...
Me![MemberID]



<font size="1"></font>
SwampThing
Room at the Top
 
Posts: 1778
Joined: Tue Jul 01, 2003 3:11 pm
Location: USA

Postby i_like_lectric_motors » Wed Jul 05, 2006 7:32 am

[quote]Originally posted by Quite Life


I tried
Dim stSQL as string
stSQL = "[MemeberID] = " & Me.MemberID
DoCmd.OpenReport "rptSomeReport", , , , , stSQL


[/quote]

Maybe [MemberID] instead of [MemeberID] ?
i_like_lectric_motors
Room at the Top
 
Posts: 6332
Joined: Tue Jul 13, 2004 1:38 pm
Location: Vatican City

Postby ben_at_work » Wed Jul 05, 2006 7:35 am

1 print "Ben Rules"
2 goto 1
ben_at_work
Room at the Top
 
Posts: 3513
Joined: Tue Dec 14, 2004 1:54 am
Location: USA

Postby Rubbeet921 » Thu Jul 06, 2006 3:58 am

[quote]Originally posted by Quite Life
[br]I'm opening a report from a form button using DoCmd.OpenReport. However, with the where clause is not right.

It needs to print up all the records in the report for a particular member ID. What's the syntax to point to the text boxes in both the form and the report. I need the correct syntax for that last part: DoCmd.OpenReport (formname), , , (field in report) = (field in form)

I tried
Dim stSQL as string
stSQL = "[MemeberID] = " & Me.MemberID
DoCmd.OpenReport "rptSomeReport", , , , , stSQL

with the MemberID is a string then:
stSQL = "[MemberID] = " & """" & Me.MemberID & """" (that's 4 double quotes in a row)

still comming up wrong


[/quote]

QL, my dear brother, I'm sorry this is late, but I hope you eventually figured out what to do?

If not, please do not lose hope, God is with you. The angels will descend from the heavens and come to you in a dream to tell you what you must do. Be patient, God works in mysterious ways...

When you finally solve your problem, please remember to send me a cheque. Any amount will be much appreciated. Remember, whatever you give, you will receive in twofold.
Rubbeet921
Room at the Top
 
Posts: 2003
Joined: Sat Aug 28, 2004 9:02 pm
Location: Philippines

Postby ben_at_work » Thu Jul 06, 2006 4:35 am

[quote][i]Originally posted by Rubbeet921[/i]
<br>[quote]Originally posted by Quite Life
[br]I'm opening a report from a form button using DoCmd.OpenReport. However, with the where clause is not right.

It needs to print up all the records in the report for a particular member ID. What's the syntax to point to the text boxes in both the form and the report. I need the correct syntax for that last part: DoCmd.OpenReport (formname), , , (field in report) = (field in form)

I tried
Dim stSQL as string
stSQL = "[MemeberID] = " & Me.MemberID
DoCmd.OpenReport "rptSomeReport", , , , , stSQL

with the MemberID is a string then:
stSQL = "[MemberID] = " & """" & Me.MemberID & """" (that's 4 double quotes in a row)

still comming up wrong


[/quote]

QL, my dear brother, I'm sorry this is late, but I hope you eventually figured out what to do?

If not, please do not lose hope, God is with you. The angels will descend from the heavens and come to you in a dream to tell you what you must do. Be patient, God works in mysterious ways...

When you finally solve your problem, please remember to send me a cheque. Any amount will be much appreciated. Remember, whatever you give, you will receive in twofold.

[/quote]

Smartass!!!! [:D][:p][:D][;)]
ben_at_work
Room at the Top
 
Posts: 3513
Joined: Tue Dec 14, 2004 1:54 am
Location: USA

Postby MikeP » Thu Jul 06, 2006 5:52 am

If [MemberID] is indeed a string, try this (with single quotes):

stSQL = "[MemberID] = " & "'" & Me.MemberID & "'"

I've done plenty of Access programming thru the years and I've come to hate programming Forms and Reports. I do like the Querying in Access though.
User avatar
MikeP
President Am I
 
Posts: 1488
Joined: Sun May 19, 2002 6:00 pm
Location: USA

Postby Quite Life » Thu Jul 06, 2006 6:11 am

[quote][i]Originally posted by MikeP[/i]
<br>If [MemberID] is indeed a string, try this (with single quotes):

stSQL = "[MemberID] = " & "'" & Me.MemberID & "'"

I've done plenty of Access programming thru the years and I've come to hate programming Forms and Reports. I do like the Querying in Access though.
[/quote]
Thats the best one that works so far thanks


One more thing and I dont beleive this: I go to build a start up switchboard from the switchboard add-on from the add-on and there is no switchboard wizard in the add-on menu I dont have this add-on in my 1033 folder niether is thier one on the server side 1033 folder where would I find this feature on the Access/Office 2002 disc? Since thier is no switchboard add-on the switchboard manager doesn't work properly. My only other option is to build a form with several control buttons and assign the form from the start-up contol but it is not a true switchboard. I will more than likely pick up a office XP resouce kit book to try to get to the bottom of this.

Thanks for the word so far,
jr
Quite Life
Room at the Top
 
Posts: 1029
Joined: Sat Apr 26, 2003 12:22 am
Location: USA

Postby Rubbeet921 » Thu Jul 06, 2006 4:13 pm

[quote][i]Originally posted by ben_at_work[/i]
...
Smartass!!!! [:D][:p][:D][;)]
[/quote]

Shut up, Ben! See, I knew MikeP was an angel even before you put that halo over his head! [;)][:D]

*Hey, btw, that NWO collage needs to be updated! We have lots of newbies around*[8D]
Rubbeet921
Room at the Top
 
Posts: 2003
Joined: Sat Aug 28, 2004 9:02 pm
Location: Philippines

Postby ben_at_work » Fri Jul 07, 2006 1:47 am

[quote][i]Originally posted by Rubbeet921[/i]
<br>[quote][i]Originally posted by ben_at_work[/i]
...
Smartass!!!! [:D][:p][:D][;)]
[/quote]

Shut up, Ben! See, I knew MikeP was an angel even before you put that halo over his head! [;)][:D]

*Hey, btw, that NWO collage needs to be updated! We have lots of newbies around*[8D]

[/quote]

[:D][;)] HAHAHA! or Bwaaaa hahahaha!!
Hey, Blir took over the collage.
Blir? did you hear that? update the collage!!!!!!! [;)]
ben_at_work
Room at the Top
 
Posts: 3513
Joined: Tue Dec 14, 2004 1:54 am
Location: USA


Return to —Not Necessarily New Wave—

Who is online

Users browsing this forum: Bing [Bot] and 2 guests