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

help me ( codes)

please explain the following code to me
I want to know in detail would you help me?



Public Function MnuUpload()
Screen.MousePointer = 11
mI = ExecuteSQL("DELETE FROM SCMnuElements WHERE IDModu='" & Mid(App.Title, 1, 2) & "'")
Set aRS = GetRSLoaded("SCMnuElements")
Dim xStri As String
Dim FormCtrl As Control
For Each FormCtrl In FrmXX
With FormCtrl
If TypeOf FormCtrl Is Menu Then
If Len(FormCtrl.Name) = 13 Then
vStri = FormCtrl.Caption
xStri = ""
For mI = 1 To Len(vStri)
If Not Mid(vStri, mI, 1) = "&" Then xStri = xStri & Mid(vStri, mI, 1)
Next
vInti = pfGetNextID("SCMnuElements", "RecNbr", "")
aRS.AddNew
aRS![RecNbr] = vInti
aRS![IDModu] = UCase(Mid(App.Title, 1, 2))
aRS![NameMo] = App.FileDescription
aRS![IDMenu] = FormCtrl.Name
aRS![NameMn] = xStri
aRS.Update
End If
End If
End With
Next
Screen.MousePointer = 0
MsgBox "Menu Elements Up-Load is Done !", vbInformation, App.FileDescription
End Function
Feb 10 '07 #1
3 1702
hariharanmca
1,977 1GB
please explain the following code to me
I want to know in detail would you help me?



Public Function MnuUpload()
Screen.MousePointer = 11
mI = ExecuteSQL("DELETE FROM SCMnuElements WHERE IDModu='" & Mid(App.Title, 1, 2) & "'")
Set aRS = GetRSLoaded("SCMnuElements")
Dim xStri As String
Dim FormCtrl As Control
For Each FormCtrl In FrmXX
With FormCtrl
If TypeOf FormCtrl Is Menu Then
If Len(FormCtrl.Name) = 13 Then
vStri = FormCtrl.Caption
xStri = ""
For mI = 1 To Len(vStri)
If Not Mid(vStri, mI, 1) = "&" Then xStri = xStri & Mid(vStri, mI, 1)
Next
vInti = pfGetNextID("SCMnuElements", "RecNbr", "")
aRS.AddNew
aRS![RecNbr] = vInti
aRS![IDModu] = UCase(Mid(App.Title, 1, 2))
aRS![NameMo] = App.FileDescription
aRS![IDMenu] = FormCtrl.Name
aRS![NameMn] = xStri
aRS.Update
End If
End If
End With
Next
Screen.MousePointer = 0
MsgBox "Menu Elements Up-Load is Done !", vbInformation, App.FileDescription
End Function

if you keepon posting bulk coding its dificult to track it

first u explain what u r looking for and wahats your problem... baby
Feb 10 '07 #2
if you keepon posting bulk coding its dificult to track it

first u explain what u r looking for and wahats your problem... baby

I want to know the techniques used in this codes
please give me the explantions of the code.

i am in little trouble in getting with the database programming.
Feb 10 '07 #3
hariharanmca
1,977 1GB
please explain the following code to me
I want to know in detail would you help me?



Public Function MnuUpload()
Screen.MousePointer = 11
mI = ExecuteSQL("DELETE FROM SCMnuElements WHERE IDModu='" & Mid(App.Title, 1, 2) & "'")
Set aRS = GetRSLoaded("SCMnuElements")
Dim xStri As String
Dim FormCtrl As Control
For Each FormCtrl In FrmXX
With FormCtrl
If TypeOf FormCtrl Is Menu Then
If Len(FormCtrl.Name) = 13 Then
vStri = FormCtrl.Caption
xStri = ""
For mI = 1 To Len(vStri)
If Not Mid(vStri, mI, 1) = "&" Then xStri = xStri & Mid(vStri, mI, 1)
Next
vInti = pfGetNextID("SCMnuElements", "RecNbr", "")
aRS.AddNew
aRS![RecNbr] = vInti
aRS![IDModu] = UCase(Mid(App.Title, 1, 2))
aRS![NameMo] = App.FileDescription
aRS![IDMenu] = FormCtrl.Name
aRS![NameMn] = xStri
aRS.Update
End If
End If
End With
Next
Screen.MousePointer = 0
MsgBox "Menu Elements Up-Load is Done !", vbInformation, App.FileDescription
End Function
1. set screen mouse pointer to HourGlass
2 Delete Record from SCMnuElements WHERE IDModu='" & Mid(App.Title, 1, 2) & "'
3 loding records in aRs

For Each FormCtrl In FrmXX
With FormCtrl
If TypeOf FormCtrl Is Menu Then
If Len(FormCtrl.Name) = 13 Then
vStri = FormCtrl.Caption
xStri = ""
For mI = 1 To Len(vStri)
If Not Mid(vStri, mI, 1) = "&" Then xStri = xStri & Mid(vStri, mI, 1)
Next
vInti = pfGetNextID("SCMnuElements", "RecNbr", "")
aRS.AddNew
aRS![RecNbr] = vInti
aRS![IDModu] = UCase(Mid(App.Title, 1, 2))
aRS![NameMo] = App.FileDescription
aRS![IDMenu] = FormCtrl.Name
aRS![NameMn] = xStri
aRS.Update
End If
End If
End With
Next
4 get all controls in Form and check if the tontrol is Menu or Not a menu
If menu then checking the name of that control name string length is 13
if yes then assigen vStri = FormCtrl.Caption

For mI = 1 To Len(vStri)
If Not Mid(vStri, mI, 1) = "&" Then xStri = xStri & Mid(vStri, mI, 1)
Next

5 replacing null if the string contain '&'
this is not good, (beter use Replace(trim(vStri),"&",""))

vInti = pfGetNextID("SCMnuElements", "RecNbr", "")

6 Geting Next Id of the Record

aRS.AddNew
aRS![RecNbr] = vInti
aRS![IDModu] = UCase(Mid(App.Title, 1, 2))
aRS![NameMo] = App.FileDescription
aRS![IDMenu] = FormCtrl.Name
aRS![NameMn] = xStri
aRS.Update

7 Adding New record,
with new id,

UCase(Mid(App.Title, 1, 2))
8 Converting Uppercase of Application first two Character

App.FileDescription
9 geting Application File Description.

FormCtrl.Name
10 Form Name


aRS.Update
11 Updating Record

this will give Error Because you are adding (aRS.AddNew) New Record but finaly you are Updating... Use (aRS.Save)


Screen.MousePointer = 0
MsgBox "Menu Elements Up-Load is Done !", vbInformation, App.FileDescription


12 set mousepointer to default arrow,
Popup Information (!) msgbox

OOOOOOOOOOOOOOooooooooooooooooooK..........
Feb 10 '07 #4

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

Similar topics

6
by: Josh Mcfarlane | last post by:
I keep trying to get myself out of the return-code mindset, but it doesn't seem to work. They are suppose to get rid of if-then statements of return codes, but you still have to do an if statement...
1
by: chris fink | last post by:
Hi, What are the appropriate HTTP Status Codes for the following: 1. XML is not well-formed (structure problem).... 2. XML is not valid (as per DTD/XSD/XDR).....missing req'd field, etc I...
5
by: CaliSchmuck | last post by:
I think this is probably simple, but I'm having a problem figuring it out. I have a form that is used to enter data. I want users to be able to enter a zip code in the form, and have the city...
4
by: Paul T. RONG | last post by:
Dear All, I add two new tables to the database and then the disable shift key codes don't work. These two new tables are actually created by two queries, and only these two are in the front end,...
18
by: Steve Litvack | last post by:
Hello, I have built an XMLDocument object instance and I get the following string when I examine the InnerXml property: <?xml version=\"1.0\"?><ROOT><UserData UserID=\"2282\"><Tag1...
1
by: emmah | last post by:
Dear Everyone, I have a small but hopefully simple problem. Please forgive my misuse of technical terminology but I am hoping someone can provide some advise. We have a database of nearly 1.6...
4
by: froglog | last post by:
I have created a MS access DB to track transport costs for tax purposes. I enter data into a main form that tracks miles traveled by date with a subform . The subform has fields for the date...
0
by: prabhuvonnet | last post by:
Hello all, I need to convert this following vb.net codes to c# codes within a day or two. So i need this help urgently. Please look at the following code and help me out to finish this barcode...
3
by: creative1 | last post by:
hi everyone I am using vb6 and access2003 combination. I have divided product codes in several catagories(11,12... ) and then using these catagories to make product codes (11001,11002,...) . For my...
0
by: fatimang | last post by:
hello., please show me sample codes on making a LISTBOX object., how to insert records in the LISTBOX? how to declare array? please show me the codes for navigation., how to open a new...
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?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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...

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.