473,847 Members | 1,525 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Consolidating Code

Hello all,

I have a 97 database that I have been trying to consolidate code. Most of my
forms use visual aids for the user to guide them along with the data entry.
For example, I will make the background color green to let the user this is
where you should be entering data, red if the data has been validated and
accepted.

I was wondering, with the following code is there a way to create a function
where I can LOOP? That way if I need to ad more line Items all I have to do
is modify the base code and change my limit from 15 to 20. Any other
pointers will be greatly appreciated.

****Lots of Code***
Private Sub Refresh_It()
Dim Red As Long, lRed As Long, yellow As Long
Dim Mydb As Database, Info As Recordset
Set Mydb = DBEngine.Worksp aces(0).Databas es(0)
Set Info = Mydb.OpenRecord set("tbl_pr_tem p", 2)
Red = 255
lRed = 255
yellow = 8454143

Me.tarhrs.Value = ((Val(Forms!frm _pr_mh.FTM) + Val(Forms!frm_p r_mh.FTE) +
Val(Forms!frm_p r_mh.TEMP)) * 8)

Info.FindFirst "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With Me
With .Line1
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod1
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW1
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line2
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod2
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW2
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line3
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod3
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW3
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line4
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod4
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW4
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line5
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod5
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW5
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line6
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod6
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW6
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line7
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod7
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW7
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line8
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod8
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW8
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line9
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod9
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW9
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line10
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod10
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With
With .SW10
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line11
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod11
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW11
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line12
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod12
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW12
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line13
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod13
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW13
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line14
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod14
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW14
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line15
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod15
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW15
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

End With
End Sub
Nov 12 '05 #1
1 1612
I'm not exactly sure why you would have a form set up the way you do, I
would think it to be much easier to maintain if you simply used the criteria
("[line]>0") when you opened your recordset along with continuous forms and
conditional formatting. With the previously mentioned combination you
should have everything you need. However because Access does not support
control arrays and I do not exactly know what you are doing and why, I have
attached some code that should illustrate how to automate such a task.

put this in a global module:
Public Type ControlFieldPai r
ControlName As String
FieldName As String
End Type


place the following code in place of your current Refresh_It routine
<aircode>
Private Sub Refresh_It()
Dim ControlFieldPai rs() As ControlFieldPai r 'array of control/field pairs
Dim x As Integer 'actual control index
Dim y As Integer 'unique control index
Dim lngBackColor As Long 'your background color
Dim lngMaxControls As Long 'maximum actual controls
Dim lngMaxUniquePai rs As Long 'max unique controls
Dim Mydb As Database, Info As Recordset

'?????
Me.tarhrs.Value = ((Val(Forms!frm _pr_mh.FTM) + Val(Forms!frm_p r_mh.FTE)
+Val(Forms!frm_ pr_mh.TEMP)) * 8)
'background color of control
lngBackColor = 255

'total number of unique control/field-pairs to work on
lngMaxUniquePai rs = 3

'maximum number of actual controls we have available to set
lngMaxControls = 15

'set the size of our array as per our lngMaxUniquePai rs variable
ReDim ControlFieldPai rs(1 To lngMaxUniquePai rs) As ControlFieldPai r

'this is the only non-automated portion of this routine, you will need
to
'enter the entry manually for each unique control/field-name pair.
'controls are entered _without_ the index portion of their name.
'ex: what control is equal to what field
ControlFieldPai rs(1).ControlNa me = "line"
ControlFieldPai rs(1).FieldName = "line"
ControlFieldPai rs(2).ControlNa me = "prod"
ControlFieldPai rs(2).FieldName = "material"
ControlFieldPai rs(3).ControlNa me = "sw"
ControlFieldPai rs(3).FieldName = "net"

x = 1

Set Mydb = DBEngine.Worksp aces(0).Databas es(0)
Set Info = Mydb.OpenRecord set("tbl_pr_tem p", 2)
Info.FindFirst "[line]>0"
'as long as we found a record in our search and
'we have not reached the last of our avail controls
While Not Info.NoMatch And x <= lngMaxControls
For y = 1 To lngMaxUniquePai rs 'work on each field
'grab the control we are interested in on this iteration
With Me.Controls(Con trolFieldPairs( y).ControlName & x)
'set its properties
.Value = Info.Fields(Con trolFieldPairs( y).FieldName).V alue
.BackColor = lngBackColor
.Locked = True
.Enabled = False
.TabStop = False
End With
Next y
x = x + 1
Info.FindNext "[line]>0" 'grab next record
Wend
'always free memory when we use such objects
Info.Close
Set Info = Nothing
Set Mydb = Nothing
End Sub
</aircode>

this looks like alot of code but its not too bad, The basic idea is to
separate the control name and its "index" ("text1","text2 ","text3",ect.. )
in order to allow automation. All we are really doing here is setting up an
array that holds both our matching control name (minus index) and field
name. We then loop through our recordset looking for records matching our
search criteria, for each one we find we go ahead and assign it to the next
available set of controls. We are able to dynamically get access to a
control and its properties by using the forms .Controls collection and
passing it the desired control name along with the current index. Similarly
we can get "dynamic" control of fields by using the recordsets .Fields
collection and passing it the desired field name. The while loop allows us
to access each record matching our criteria while the For...Next loop allows
us to iterate across the fields within each matching record.

HTH

Mike Krous
"None" <No**@none.co m> wrote in message
news:1N******** ************@dl s.net...
Hello all,

I have a 97 database that I have been trying to consolidate code. Most of my forms use visual aids for the user to guide them along with the data entry. For example, I will make the background color green to let the user this is where you should be entering data, red if the data has been validated and
accepted.

I was wondering, with the following code is there a way to create a function where I can LOOP? That way if I need to ad more line Items all I have to do is modify the base code and change my limit from 15 to 20. Any other
pointers will be greatly appreciated.

****Lots of Code***
Private Sub Refresh_It()
Dim Red As Long, lRed As Long, yellow As Long
Dim Mydb As Database, Info As Recordset
Set Mydb = DBEngine.Worksp aces(0).Databas es(0)
Set Info = Mydb.OpenRecord set("tbl_pr_tem p", 2)
Red = 255
lRed = 255
yellow = 8454143

Me.tarhrs.Value = ((Val(Forms!frm _pr_mh.FTM) + Val(Forms!frm_p r_mh.FTE) +
Val(Forms!frm_p r_mh.TEMP)) * 8)

Info.FindFirst "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With Me
With .Line1
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod1
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW1
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line2
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod2
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW2
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line3
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod3
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW3
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line4
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod4
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW4
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line5
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod5
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW5
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line6
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod6
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW6
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line7
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod7
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW7
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line8
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod8
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW8
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line9
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod9
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW9
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line10
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod10
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With
With .SW10
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line11
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod11
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW11
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line12
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod12
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW12
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line13
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod13
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW13
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line14
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod14
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW14
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

Info.FindNext "[line]>0"
If Info.NoMatch Then
Exit Sub
End If

With .Line15
.Value = Info.Fields![Line].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .Prod15
.Value = Info.Fields![material].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

With .SW15
.Value = Info.Fields![Net].Value
.BackColor = lRed
.Locked = True
.Enabled = False
.TabStop = False
End With

End With
End Sub

Nov 12 '05 #2

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

Similar topics

51
5313
by: Mudge | last post by:
Please, someone, tell me why OO in PHP is better than procedural.
2
1395
by: mmmGrubb | last post by:
I have a printer log that I need to manipulate. Each row contains document name and total # of pages in the document. Document names contain various 12 digit alphanumberic codes. I want to make a report that lists all rows with a common code in one row with their page totals summed. So, what I want to do is make a table that looks like this: document total AAAAAAA11111 3
2
1905
by: Gregc. | last post by:
G'day I have two tables with transactional data. Table 1 has a Cost Centre, Account, Fund Code and a YTD0-6 figure for each Account Number. Table 2 has Cost Centre, Account, Fund Code, Period 7, Period 8, Period 9, Period 10, Period 11, Period 12 data. Both Tables are linked to 'Data Tables' , Account Information, Cost Centres Information and Fund Type Information.
1
2625
by: Monkey Boy | last post by:
I've used Access pretty basically for the last couple of years, and I'm slowly trying to get a bit more advanced. I'm attempting to consolidate multiple tables with similar information. Some tables might have an extra column, but for the most part these fields are similar (data within fileds is unique, at least somewhat unique). What is the best way to get the headers all populated and to fill the data fields accordingly. For example,...
7
1354
by: NoviceProgramer | last post by:
Hi Every body I have a query that outputs students names on certain criteria I want to collect these names in a single textbox in a form(separated by space or dash) the number of records varied each time. what can I do to achieve that Thanks very much for your help
3
1557
seshu
by: seshu | last post by:
Hi everybody This is seshu i have designed a software for attendence purpose ofcourse it is working fine but iam not not satisfied as the code i wrote there is very messy so i want disign in such a manner that it gives a profisional look i can handel the front enb but the thing is u must be knowing that database disign plays a vital role in desighning a software and iam very poor in this matter ok now coming my doubt ...
1
1643
by: filmfanatic | last post by:
In this emal form, I'm trying to consolidate all the input into the TEXTAREA portion and then have it emailed to a specific person. I've tried the onClick and onBlur commands but only one field's input shows at a given time in the TEXTAREA box. Then, then when I move to the next field and input text, it just erases the choice from the first field in the TEXTAREA box below. Basically, I want the data to consolidate in the TEXTAREA box and...
6
1264
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, protected void Calendar1_VisibleMonthChanged(object sender, MonthChangedEventArgs e) { OnBubbleClick(e); } protected void Calendar1_SelectionChanged(object sender, EventArgs e) { OnBubbleClick(e);
19
1997
RMWChaos
by: RMWChaos | last post by:
Previously, I had used independent JSON lists in my code, where the lists were part of separate scripts. Because this method did not support reuse of a script without modification, I decided to consolidate all my JSON lists into one and modify my scripts so that they were more generic and reusable. So far so good. The problem is that my JSON lists used variables for many pieces of code that performed multiple iterations to create several...
0
9892
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10996
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10658
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10718
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9497
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7889
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7062
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5915
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4541
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.