473,406 Members | 2,620 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,406 software developers and data experts.

Flags

lee123
556 512MB
i have sufed the web and read some of the books i have bought throught the year but i can't seem to find how to set a flag in my application can someone help me and give me an idea about how this can be done in visual basic 6 or is there circumstancese to doing this

lee123
Jul 28 '08 #1
1 1337
lee123
556 512MB
this the code i want a flag in it but as you can see i don't understand the flagging. in this code i don't want the msgbox in the second half to show up until all the information is answered how can i do this with a flag:

Expand|Select|Wrap|Line Numbers
  1. Private Sub txtAmountPaid_LostFocus()
  2. Dim response As String, flags As Integer
  3.      txtAmountPaid.Text = FormatCurrency(txtAmountPaid)
  4. If OptMoneyOrder.Value = True Then
  5.     response = MsgBox("Is This a Money Order?", vbYesNo + vbQuestion, "Money Order")
  6.     If response <> vbYes Then Exit Sub
  7.     txtMoneyOrderNumber.SetFocus
  8. End If
  9. If txtAmountPaid.Text = True Then
  10.     flags = response
  11.     response = MsgBox("Is there Or Was there a Reference Number With or for this bill?", vbYesNo + vbQuestion, "Reference Number")
  12.     If response = vbYes Then
  13.     FReferenceNumber.Visible = True
  14.     txtReferenceNumber.Visible = True
  15.     txtReferenceNumber.SetFocus
  16. Else
  17.     lblMessage.Visible = True
  18.     lblMessage.FontSize = 40
  19.     lblMessage.Alignment = 2
  20.     lblMessage.FontBold = True
  21.     lblMessage.Caption = "Complete"
  22. End If
  23. End If
  24. End Sub
Did I Do this right because it doesn't work. the "txtamountpaid" is a textbox that is used also with another "opt control" (Cash) option this on works fine but when i click on the moneyorder option after i enter in the amount the second msgbox appears. i don't want it to appear until they either chose a yes or no value. i think i explained this right?
Jul 28 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Xah Lee | last post by:
Python re module has methods flags and pattern. How to use these exactly? e.g. i tried print patternObj.flags() and the error is some "int object is not callable". ...
7
by: loquak | last post by:
Greets. I wonder which way would be the best for holding some state flags in terms of memory use and efficiency. a) struct FLAGS { bool flag1 : 1; bool flag2 : 1;
6
by: Alexis Gatt | last post by:
Hi guys, I was reading the source code of a lib, and I came across this odd way of defining flags #define PHONG_RV (0<<0) #define PHONG_NH (1<<0) Here is how they're used:
13
by: Mark A. Odell | last post by:
I write a lot of drivers and there is inevitably some hardware register or buffer descriptor field called 'flags'. The flags are defined, typically, as bit positions. I was thinking I could get...
3
by: Ignacio X. Domínguez | last post by:
Hi. I'm using the | operator to use multiple flags in a variable. For example: const int flag1 = 0x00000001; const int flag2 = 0x00000002; const int flag3 = 0x00000004; int Flags = flag2 |...
1
by: todorov-fkt | last post by:
Hello everyone, I have a field which is 1 byte long and is used to store different flags (according to specs) - it is the flags bit in the ID3 tag header. So 0xabc00000 represents the byte,...
1
by: Dwight.Dexter | last post by:
I have an enum variable. Is there some way to cast an int or BitArray and get my enum value? I have to communicate with an old C-style sever so I get an array of bits("0","1"). But I'm using an...
1
by: RicercatoreSbadato | last post by:
I have notice that my images have the value Image.Flags = 2 (HasAlpha). How Can I set the Flags to 1? I would like to eliminate the alpha channel... -- RicercatoreSbadato
4
by: Joel Moore | last post by:
Say I have an enum similar to this: <Flags()> Enum TestFlags As Short One = 0 Two = 1 Three = 2 Four = 4 End Enum I figured I could declare variable of type TestFlags to be used in the
1
by: Alexander Korsunsky | last post by:
Hi! Is it possible to extract the mode flags of a stream (FILE* stream or fstream - object), without looking at how the stream was opened? What I mean by mode flags is wether the stream is opened...
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: 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?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.