473,395 Members | 1,401 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,395 software developers and data experts.

Change back to no on close

I plan to add a PrintMe column (Yes/No) to my main table so that only
certain records will be printed.

How do I change the values back to No when I close the form which is
based on a query based on the table.

Thanks for your help.

Nov 13 '05 #1
5 1270
dm******@hotmail.com wrote:
I plan to add a PrintMe column (Yes/No) to my main table so that only
certain records will be printed.

How do I change the values back to No when I close the form which is
based on a query based on the table.

Thanks for your help.


CurrentDB.Execute "UPDATE TableName SET FieldName = 0", dbFailOnError

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2
Rick,
That will update every row in the table. I believe a change to your SQL is
needed to add a WHERE clause so it only updates the row or rows that DMKeith
wanted updated. Something like, "WHERE MainTable.RowID=888".

"Rick Brandt" <ri*********@hotmail.com> wrote in message
news:0t*****************@newssvr12.news.prodigy.co m...
dm******@hotmail.com wrote:
I plan to add a PrintMe column (Yes/No) to my main table so that only
certain records will be printed.

How do I change the values back to No when I close the form which is
based on a query based on the table.

Thanks for your help.


CurrentDB.Execute "UPDATE TableName SET FieldName = 0", dbFailOnError

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com

Nov 13 '05 #3
Alan Webb wrote:
"Rick Brandt" <ri*********@hotmail.com> wrote in message
news:0t*****************@newssvr12.news.prodigy.co m...
dm******@hotmail.com wrote:
I plan to add a PrintMe column (Yes/No) to my main table so that
only certain records will be printed.

How do I change the values back to No when I close the form which
is based on a query based on the table.
Rick,
That will update every row in the table. I believe a change to your
SQL is needed to add a WHERE clause so it only updates the row or
rows that DMKeith wanted updated. Something like, "WHERE
MainTable.RowID=888".


The OP indicated that the Yes/No field is used to determine which records in the
table will be printed. After printing it sounds to me like he would want all of
those fields reset. Otherwise yes, some kind of WHERE clause would be required.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #4
Basically what I got is when I select Yes only the personnel with yes
selected in the print me form will open up.

I would like after the report opens the form will close and reset the
print me field back to no.

Thanks

Nov 13 '05 #5
Thanks for your help I got it to work.

On Close I put this in

CurrentDb.Execute "UPDATE tblMain SET PrintMe = 0", dbFailOnError

The code above also lets me do this to create a button to make all yes
or all no
CurrentDb.Execute "UPDATE tblMain SET PrintMe = 0", dbFailOnError
DoCmd.Requery

works great thanks.

Nov 13 '05 #6

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

Similar topics

10
by: rxl124 | last post by:
I have files that I only need one field that I need to grep it out and I am trying to assign that to another file. (It happens that one field that I am looking for has some other character that...
3
by: Micromanaged | last post by:
Is it possible (and if so, how?) to have an asp form page that based upon a user's selection on a field, would generate a input field b that the user selects? For example: User selects "name"...
5
by: Charles F McDevitt | last post by:
I'm converting some old programs that use old iostreams. In one program, the program is using cout to output to the stdout stream. Part way through, the program wants to put some binary data out,...
10
by: IchBin | last post by:
I am trying to set the state of a radio button. I do not see what I am doing wrong. Sorry, I am new at this.. I need another set of eyes to look at this snip of code. I am trying to set the radio...
3
by: LucaBrasi | last post by:
I'm having trouble locating code to change the names/locations of linked tables. For example, App1.mdb is linked to tblA in w:\server1\data. I want the code to enable App1.mdb to relink to tblA in...
1
by: roshina | last post by:
Hi Iam facing a problem in my project, developing a web site for online shopping in ASP on windows XP using IIS server. All the validations are ok but the new password is not upadated in the data...
130
by: Gianni Mariani | last post by:
Attached example CPP files makes it easier to post code and extract code from posts. It's unimaginable at this time where virtually any news reader is capable of dealing with attachments to stick...
8
by: Phil Stanton | last post by:
Using Access 2000 (Yes I know there is no Printer specified) and an MDE File (Yes I know I can't open a report in design view). Is there any way using VBA of temporarily changing the report's...
2
by: remya1000 | last post by:
i'm using VB.NET. and its a windows application. in my program i need to display a table in datagrid. so i created the table using DataTable and i'm calling that dataTable to dataGrid. and its...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.