473,320 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Programming Access Reports with VBA

I have a fairly simple task, or at least I think it should be. I have
a report with two fields on it,

BadgeIn (text)
BadgeOut (text)
chkIncorrect (yes/no)

I want to check if these values are equal and if they are not, update
an outbound checkbox to true. When I try to code the report on the on
open, nothing works. Which event should I be putting my code in? The
below code is what I have.

if BadgeIn <BadgeOut then
chkIncorrect.value = true
else
chkIncorrect.value = false
end if
I have also tried

if BadgeIn.value <BadgeOut.value then
chkIncorrect.value = true
else
chkIncorrect.value = false
end if

Any thoughts?

Dave

Jan 3 '07 #1
2 2352
st********@hotmail.com wrote:
I have a fairly simple task, or at least I think it should be. I have
a report with two fields on it,

BadgeIn (text)
BadgeOut (text)
chkIncorrect (yes/no)
Um, that's three fields :-)
I want to check if these values are equal and if they are not, update
an outbound checkbox to true.
Not sure wht you mean by "outbound checkbox". Did you mean an "Unbound"
checkbox? And is that the third field mentioned above?
When I try to code the report on the on
open, nothing works. Which event should I be putting my code in? The
below code is what I have.

if BadgeIn <BadgeOut then
chkIncorrect.value = true
else
chkIncorrect.value = false
end if
I have also tried

if BadgeIn.value <BadgeOut.value then
chkIncorrect.value = true
else
chkIncorrect.value = false
end if
No code needed. Just use a CheckBox with a ControlSource expression of...

=(BadgeIn = BadgeOut)

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jan 3 '07 #2
OutBound :-) I ment unbound.

Setting the control source to =([BadgeIn] <[BadgeOut]) did the trick.

Thanks!

Dave
Rick Brandt wrote:
st********@hotmail.com wrote:
I have a fairly simple task, or at least I think it should be. I have
a report with two fields on it,

BadgeIn (text)
BadgeOut (text)
chkIncorrect (yes/no)

Um, that's three fields :-)
I want to check if these values are equal and if they are not, update
an outbound checkbox to true.

Not sure wht you mean by "outbound checkbox". Did you mean an "Unbound"
checkbox? And is that the third field mentioned above?
When I try to code the report on the on
open, nothing works. Which event should I be putting my code in? The
below code is what I have.

if BadgeIn <BadgeOut then
chkIncorrect.value = true
else
chkIncorrect.value = false
end if
I have also tried

if BadgeIn.value <BadgeOut.value then
chkIncorrect.value = true
else
chkIncorrect.value = false
end if

No code needed. Just use a CheckBox with a ControlSource expression of...

=(BadgeIn = BadgeOut)

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Jan 3 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: deko | last post by:
Access is okay, and it's been fun learning VB, but I've realized I've been trying to develop an application, not just a desktop database. It's time to fire up VS.NET and crack that C# book. I...
3
by: bla | last post by:
Hello all, Does anybody have working sample VBA code to change printerdriver in a report and to get a list of available drivers and there functionality? It is for Access 2000. This version of...
3
by: Gheaci Maschl | last post by:
Hi all! I would like to have your opinion about my problem and my proposal how to solve it: Ingredients: - BTriev database - Crystal Reports - maybe MS Access - Liinos6 (small ERP software)
3
by: trustme1 | last post by:
I am wanting to be able to write reports against an ms-access database that is part of another package. I only want to report from the database. What I need is a package that will allow me to...
1
by: Bilal Iqbal | last post by:
Hi. Currently i have database MS Access. In the database there are some Reports already designed. i am developing interface in VB and linking to MS Access database. My Problem is to access/Link...
2
by: B.Newman | last post by:
I've got some VB.NET code that *should* get a list of reports from an Access MDB and populate a list box with them. It doesn't detect any of the reports at all. oAccess.Reports.Count comes up as...
6
by: Bob Alston | last post by:
I am looking for Access reporting add-in that would be easy to use by end users. My key focus is on selection criteria. I am very happy with the Access report writer capabilities. As far as...
16
by: JoeW | last post by:
I'm utilizing a database that I created within MS Access within a program I've created in VB.NET. I am using the VB front end to navigate the information, but want to be able to print a report,...
0
MMcCarthy
by: MMcCarthy | last post by:
VBA is described as an Event driven programming language. What is meant by this? Access, like most Windows programs, is an event driven application. This means that nothing happens unless it is...
5
by: Andrey Hristoliubov | last post by:
I am confident that I am one of the best c++ programmer in the world. And now I am going to prove it to you. My reference is Victor Bazarov,Valentin Samko, Alf P.Steinbach( Me and Alf intern...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.