473,511 Members | 14,825 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

create public function - Access 2003, XP OS

12 New Member
Ok, pros... I have like 80 rectangles on a form that i want to kinda act like check boxes. I have already figured out how to get them to appear/dissappear when the list box value that corresponds to the rectangle is populated or not. I have also figured out how to change the color of the box depending on if the "Actual" corresponding check box is set true/false accordingly...

Now the problem, I don't want to have to replicate the code for EVERY box. Is there a way to get this to run depending on which rectangle box I select? I am at a loss here and would appreciate any help... thanks in advance.

Here's what I have that works for setting the value to the listbox rowid and then changing the color of the rectangle to represent true or false...

Expand|Select|Wrap|Line Numbers
  1. Private Sub BoxCheck()
  2. 'Sets focus to 1st Bill List Box and selects line 0.
  3. Me.lst1st_Bills.SetFocus
  4. Me.lst1st_Bills.ListIndex = 0
  5.  
  6. 'If the 1st Bills "Paid" Box is Red, then will change to Green and set chkPaid value to "True"
  7. 'and refresh.
  8. If Me.Ctl1stBoxPaid1.BackColor = 255 Then
  9. Me.Ctl1stBoxPaid1.BackColor = 65280
  10. Me.chkPaid.SetFocus
  11. Me.chkPaid.Value = True
  12. Me.Refresh
  13. Else
  14.  
  15. 'If the 1st Bills "Paid" Box is Green, then will change to Red and set chkPaid value to "False"
  16. 'and refresh.
  17. Me.Ctl1stBoxPaid1.BackColor = 255
  18. Me.chkPaid.SetFocus
  19. Me.chkPaid.Value = False
  20. Me.Refresh
  21. End If
  22. End Sub
  23.  
Here is what the form looks like to give you an idea of the useage... hopefully you all can make it out ok. Thanks again.
Attached Images
File Type: jpg DBform.JPG (18.3 KB, 530 views)
Nov 12 '07 #1
12 4956
ADezii
8,834 Recognized Expert Expert
Ok, pros... I have like 80 rectangles on a form that i want to kinda act like check boxes. I have already figured out how to get them to appear/dissappear when the list box value that corresponds to the rectangle is populated or not. I have also figured out how to change the color of the box depending on if the "Actual" corresponding check box is set true/false accordingly...

Now the problem, I don't want to have to replicate the code for EVERY box. Is there a way to get this to run depending on which rectangle box I select? I am at a loss here and would appreciate any help... thanks in advance.

Here's what I have that works for setting the value to the listbox rowid and then changing the color of the rectangle to represent true or false...

Expand|Select|Wrap|Line Numbers
  1. Private Sub BoxCheck()
  2. 'Sets focus to 1st Bill List Box and selects line 0.
  3. Me.lst1st_Bills.SetFocus
  4. Me.lst1st_Bills.ListIndex = 0
  5.  
  6. 'If the 1st Bills "Paid" Box is Red, then will change to Green and set chkPaid value to "True"
  7. 'and refresh.
  8. If Me.Ctl1stBoxPaid1.BackColor = 255 Then
  9. Me.Ctl1stBoxPaid1.BackColor = 65280
  10. Me.chkPaid.SetFocus
  11. Me.chkPaid.Value = True
  12. Me.Refresh
  13. Else
  14.  
  15. 'If the 1st Bills "Paid" Box is Green, then will change to Red and set chkPaid value to "False"
  16. 'and refresh.
  17. Me.Ctl1stBoxPaid1.BackColor = 255
  18. Me.chkPaid.SetFocus
  19. Me.chkPaid.Value = False
  20. Me.Refresh
  21. End If
  22. End Sub
  23.  
Here is what the form looks like to give you an idea of the useage... hopefully you all can make it out ok. Thanks again.
I find your request very confusing, but I'll make an attempt to at least point you in the right direction. The following code will:
  1. Populate a List Box named lstRectangles with the Names of all Rectangles contained on the Form
    Expand|Select|Wrap|Line Numbers
    1. Dim ctl As Control, lstBox As ListBox
    2.  
    3. Set lstBox = Me![lstRectangles]
    4.  
    5. lstBox.RowSourceType = "Value List"
    6.  
    7. For Each ctl In Me.Controls
    8.   If ctl.ControlType = acRectangle Then
    9.     lstBox.AddItem ctl.Name
    10.   End If
    11. Next
    12.  
  2. In The AfterUpdate() Event of the List Box, the code will change the BackColor to Red if a Rectangle has been selected, and Green if it has not.
    Expand|Select|Wrap|Line Numbers
    1. Private Sub lstRectangles_AfterUpdate()
    2. Dim ctl As Control
    3. Dim intCurrentRow As Integer
    4.  
    5. Set ctl = Me![lstRectangles]
    6.  
    7. For intCurrentRow = 0 To ctl.ListCount - 1
    8.   If ctl.Selected(intCurrentRow) Then
    9.     Me.Controls(ctl.ItemData(intCurrentRow)).BackColor = vbRed
    10.   Else
    11.     Me.Controls(ctl.ItemData(intCurrentRow)).BackColor = vbGreen
    12.   End If
    13. Next intCurrentRow
    14. End Sub
    15.  
  3. It's the best I could come up with given the information provided - hope it is close to what you were expecting.
Nov 13 '07 #2
juengelj
12 New Member
I find your request very confusing, but I'll make an attempt to at least point you in the right direction.
Sorry, about the confusion... I am quite the newb, and am still trying to understand the language... if you know what I mean.

Basically, what this particular form of my DB is for is this:
I am able to add monthly expenses/bills as well as view/edit from this form via listbox selection... simple enough. There are a total of Four listboxes one for 1st Bills, 1st Expenses, 15th Bills and 15th Expenses resepectively. That part I got down and don't have an issue with data selection and population of the listboxes... all good there.

The second part, which is the area of confusion is this:

SCENARIO.. There is 1 table, and one of the fields are named "Paid" which is true/false. The form, has 4 listboxes. We will concentrate on Listbox1. For the sake of discussion, Lets says I only have 1 record.

Ok, now...

I created 56 rectangles, colored RED, and lined them up with the individual listbox rows. When "Rectangle1" which represents the "paid" column of the record assigned to listbox1.row0 is "clicked", it will change the background color of the "RECTANGLE" to GREEN which in turn updates the record to set "paid" value = true.

I have successfully pulled this off using the code in the original post. However, I don't want to have to repeat that code for EACH rectangle on the form. I am wondering if there is a way to create a global-type function that will resolve this function for me? I hope this cleared it up a little. Again, I thank you for your time and appologize for any confusion.
Nov 13 '07 #3
ADezii
8,834 Recognized Expert Expert
Sorry, about the confusion... I am quite the newb, and am still trying to understand the language... if you know what I mean.

Basically, what this particular form of my DB is for is this:
I am able to add monthly expenses/bills as well as view/edit from this form via listbox selection... simple enough. There are a total of Four listboxes one for 1st Bills, 1st Expenses, 15th Bills and 15th Expenses resepectively. That part I got down and don't have an issue with data selection and population of the listboxes... all good there.

The second part, which is the area of confusion is this:

SCENARIO.. There is 1 table, and one of the fields are named "Paid" which is true/false. The form, has 4 listboxes. We will concentrate on Listbox1. For the sake of discussion, Lets says I only have 1 record.

Ok, now...

I created 56 rectangles, colored RED, and lined them up with the individual listbox rows. When "Rectangle1" which represents the "paid" column of the record assigned to listbox1.row0 is "clicked", it will change the background color of the "RECTANGLE" to GREEN which in turn updates the record to set "paid" value = true.

I have successfully pulled this off using the code in the original post. However, I don't want to have to repeat that code for EACH rectangle on the form. I am wondering if there is a way to create a global-type function that will resolve this function for me? I hope this cleared it up a little. Again, I thank you for your time and appologize for any confusion.
Thanks for the explanation, some of the fog has actually lifted. There should be a fairly and more efficient way to accomplish this. I'll see what I can come up with later on.
Nov 13 '07 #4
MMcCarthy
14,534 Recognized Expert Moderator MVP
To set up a public (global) type function you create it in a module as opposed to the form.

Expand|Select|Wrap|Line Numbers
  1. Function doSomething(variable As Datatype) As Datatype
  2.  
  3.     ' your code here
  4.  
  5.     doSomething=Your return value here
  6.  
  7. End Function
  8.  
This allows you to pass one or more values to the function and return a value from the function.

You then call this function as required in your code

Me!mycontrol = doSomething(SomeValue)

Try writing the fuction yourself in a module and we will try to help if you run into problems.
Nov 13 '07 #5
ADezii
8,834 Recognized Expert Expert
Sorry, about the confusion... I am quite the newb, and am still trying to understand the language... if you know what I mean.

Basically, what this particular form of my DB is for is this:
I am able to add monthly expenses/bills as well as view/edit from this form via listbox selection... simple enough. There are a total of Four listboxes one for 1st Bills, 1st Expenses, 15th Bills and 15th Expenses resepectively. That part I got down and don't have an issue with data selection and population of the listboxes... all good there.

The second part, which is the area of confusion is this:

SCENARIO.. There is 1 table, and one of the fields are named "Paid" which is true/false. The form, has 4 listboxes. We will concentrate on Listbox1. For the sake of discussion, Lets says I only have 1 record.

Ok, now...

I created 56 rectangles, colored RED, and lined them up with the individual listbox rows. When "Rectangle1" which represents the "paid" column of the record assigned to listbox1.row0 is "clicked", it will change the background color of the "RECTANGLE" to GREEN which in turn updates the record to set "paid" value = true.

I have successfully pulled this off using the code in the original post. However, I don't want to have to repeat that code for EACH rectangle on the form. I am wondering if there is a way to create a global-type function that will resolve this function for me? I hope this cleared it up a little. Again, I thank you for your time and apologize for any confusion.
I've developed a system for you which will significantly reduce the volume of code, and at the same time reduce redundancy, and increase the code efficiency. It involves the creation of a Private Sub-Procedure in your Form's Code Module. This Procedure will be called from the Click() Event of each Rectangle (1 line of code), and the Procedure itself will accept 2 Arguments: 1 to specifically identify the Rectangle whose Click() Event was triggered, and the other a specific Reference to a List Box Control. All logic is contained within the Procedure which need not return any value. Follow the below listed steps carefully and you should be OK:
  1. Copy and Paste the following code segment to the General Declarations Section of the Form's Code Module. It will now show up as a Private Sub-Procedure for the Form.
    Expand|Select|Wrap|Line Numbers
    1. Private Sub FormatRectangles(rec As Rectangle, lst As ListBox)
    2. Const conBackStyleNormal As Integer = 1
    3.  
    4. 'Allows for color to show through
    5. rec.BackStyle = 1
    6.  
    7. 'Sets focus to 1st Bill List Box and selects line 0.
    8. lst.SetFocus
    9. lst.ListIndex = 0
    10.  
    11. 'If the 1st Bills "Paid" Box is Red, then will change to Green
    12. 'and set chkPaid value to "True" and refresh.
    13. If rec.BackColor = vbRed Then
    14.   rec.BackColor = vbGreen
    15.     Me![chkPaid].SetFocus
    16.     Me![chkPaid].Value = True
    17.       Me.Refresh
    18. Else
    19.  'If the 1st Bills "Paid" Box is Green, then will change to Red
    20.  'and set chkPaid value to "False" and refresh.
    21.   rec.BackColor = vbRed
    22.     Me![chkPaid].SetFocus
    23.     Me![chkPaid].Value = False
    24.       Me.Refresh
    25. End If
    26. End Sub
    27.  
  2. For each Rectangle, make the call to FormatRectangles() in its Click() Event by passing a Reference to the Rectangle and the required List Box in that order. I'll use the 1st Rectangle and 1st List Box as defined by you as an example.
    Expand|Select|Wrap|Line Numbers
    1. Private Sub Ctl1stBoxPaid1_Click()
    2.   Call FormatRectangles(Me![Ctl1stBoxPaid1], Me![lst1stBills])
    3. End Sub
  3. If you have any problems related to what I have shown you, please feel free to ask.
Nov 13 '07 #6
ADezii
8,834 Recognized Expert Expert
To set up a public (global) type function you create it in a module as opposed to the form.

Expand|Select|Wrap|Line Numbers
  1. Function doSomething(variable As Data type) As Datatype
  2.  
  3.     ' your code here
  4.  
  5.     doSomething=Your return value here
  6.  
  7. End Function
  8.  
This allows you to pass one or more values to the function and return a value from the function.

You then call this function as required in your code

Me!my control = doSomething(Some Value)

Try writing the function yourself in a module and we will try to help if you run into problems.
Sorry Mary, I don't want you to think that I was contradicting you, and your solution to this problem (ref Post #6). I feel as though the code should be contained within a Private Sub-Procedure on the Form for the following reasons:
  1. The context of the Code as far as scope, is strictly limited to the confines of the Form, that is why I placed it there Privately as opposed to Publicly in a Standard Code Module. The Overhead is also reduced.
  2. The Procedure need not return any value, hence the use of a Sub-Procedure as opposed to a Function.
  3. A Public Function will certainly work, but would require fully qualified References to the Controls as opposed to using the Me Keyword. If another Form was using this logic, however, a Public Routine would be needed.
  4. If my Account is deleted the next time I log on, I'll understand why. (LOL).
Nov 13 '07 #7
MMcCarthy
14,534 Recognized Expert Moderator MVP
Sorry Mary, I don't want you to think that I was contradicting you, and your solution to this problem (ref Post #6). I feel as though the code should be contained within a Private Sub-Procedure on the Form for the following reasons:
  1. The context of the Code as far as scope, is strictly limited to the confines of the Form, that is why I placed it there Privately as opposed to Publicly in a Standard Code Module. The Overhead is also reduced.
  2. The Procedure need not return any value, hence the use of a Sub-Procedure as opposed to a Function.
  3. A Public Function will certainly work, but would require fully qualified References to the Controls as opposed to using the Me Keyword. If another Form was using this logic, however, a Public Routine would be needed.
  4. If my Account is deleted the next time I log on, I'll understand why. (LOL).
I'll let you away with it this time :) Only because you provided such a neat solution though (LOL)

No harm for the OP to know how to create a public function anyway.
Nov 13 '07 #8
juengelj
12 New Member
[*] Copy and Paste the following code segment to the General Declarations Section of the Form's Code Module. It will now show up as a Private Sub-Procedure for the Form.
Expand|Select|Wrap|Line Numbers
  1. Private Sub FormatRectangles(rec As Rectangle, lst As ListBox)
  2. Const conBackStyleNormal As Integer = 1
  3.  
  4. 'Allows for color to show through
  5. rec.BackStyle = 1
  6.  
  7. 'Sets focus to 1st Bill List Box and selects line 0.
  8. lst.SetFocus
  9. lst.ListIndex = 0
  10. 'If the 1st Bills "Paid" Box is Red, then will change to Green
  11. 'and set chkPaid value to "True" and refresh.
  12. If rec.BackColor = vbRed Then
  13.   rec.BackColor = vbGreen
  14.     Me![chkPaid].SetFocus
  15.     Me![chkPaid].Value = True
  16.       Me.Refresh
  17. Else
  18.  'If the 1st Bills "Paid" Box is Green, then will change to Red
  19.  'and set chkPaid value to "False" and refresh.
  20.   rec.BackColor = vbRed
  21.     Me![chkPaid].SetFocus
  22.     Me![chkPaid].Value = False
  23.       Me.Refresh
  24. End If
  25. End Sub
  26.  
[*] For each Rectangle, make the call to FormatRectangles() in its Click() Event by passing a Reference to the Rectangle and the required List Box in that order. I'll use the 1st Rectangle and 1st List Box as defined by you as an example.
Expand|Select|Wrap|Line Numbers
  1. Private Sub Ctl1stBoxPaid1_Click()
  2.   Call FormatRectangles(Me![Ctl1stBoxPaid1], Me![lst1stBills])
  3. End Sub
[*] If you have any problems related to what I have shown you, please feel free to ask.[/list]
Wow, you are a mad scientist! Great idea... :) That idea actually works pretty good. The only thing is... well, check this out...

'Sets focus to 1st Bill List Box.
lst.SetFocus
lst.ListIndex = 0
...in the code you set the declaration for the list.index in the code to "0", which makes this NOT possible to use on all the boxes? Now I have tried adding a field to your Sub() like this...

Expand|Select|Wrap|Line Numbers
  1. Private Sub FormatRectangles(rec As Rectangle, lst As ListBox, ind as index)
...But that doesn't work either. As far as I can tell, if the code does NOT select the listbox and row before adding the check, it will not update the appropriate "paid" column... which obviously is a problem. Do you have any suggestions for getting around this? In the mean time... trust me I am working very hard to resolve this problem on my own as well... It just takes me LOADS of time being that I am a newb! :)

Thanks again, your suggestion to get around my last problem proved to be quite useful in other areas as well... I really appreciate you ALL who spend time here helping others, it speaks volumes to your characters! God Bless.
Nov 17 '07 #9
ADezii
8,834 Recognized Expert Expert
Wow, you are a mad scientist! Great idea... :) That idea actually works pretty good. The only thing is... well, check this out...



...in the code you set the declaration for the list.index in the code to "0", which makes this NOT possible to use on all the boxes? Now I have tried adding a field to your Sub() like this...

Expand|Select|Wrap|Line Numbers
  1. Private Sub FormatRectangles(rec As Rectangle, lst As ListBox, ind as index)
...But that doesn't work either. As far as I can tell, if the code does NOT select the listbox and row before adding the check, it will not update the appropriate "paid" column... which obviously is a problem. Do you have any suggestions for getting around this? In the mean time... trust me I am working very hard to resolve this problem on my own as well... It just takes me LOADS of time being that I am a newb! :)

Thanks again, your suggestion to get around my last problem proved to be quite useful in other areas as well... I really appreciate you ALL who spend time here helping others, it speaks volumes to your characters! God Bless.
If I interpret you correctly, the Numeric Value at the end of the Rectangle Field Name should coincide with the Numbered Row in the associated List Box. If you are passing Rectangle2 and lst1stBills to the FormatRectangles() Sub Procedure, then the 2nd item in lst1stBills should be selected:
Expand|Select|Wrap|Line Numbers
  1. Call FormatRectangles(Me![Rectangle2], Me![lst1stBills])
If this is your case, then here is your solution:
  1. Decorate a Private Variable named intRectangleID in your Form's Code Module.
    Expand|Select|Wrap|Line Numbers
    1. Private intRectangleID As Integer
  2. For each Rectangle, 'PRIOR' to making the call to FormatRectangles(), assign the proper value to intRectangleID. I'll stay with Rectangle2 as my example.
    Expand|Select|Wrap|Line Numbers
    1. Private Sub Rectangle2_DblClick(Cancel As Integer)
    2.   intRectangleID = 2       'Insert Unique Value for each Rectangle
    3.   Call FormatRectangles(Me![Rectangle2], Me![lst1stBills])
    4. End Sub
    5.  
  3. I showed the Routine in its entirety, but change only Line #9 to reflect the new Value for ListIndex in FormatRectangles().
    Expand|Select|Wrap|Line Numbers
    1. Private Sub FormatRectangles(rec As Rectangle, lst As ListBox)
    2. Const conBackStyleNormal As Integer = 1
    3.  
    4. 'Allows for color to show through
    5. rec.BackStyle = 1
    6.  
    7. 'Sets focus to 1st Bill List Box and selects line 0.
    8. lst.SetFocus
    9. lst.ListIndex = intRectangleID - 1        'ListIndex will now coincide with Rectangle#
    10.  
    11. 'If the 1st Bills "Paid" Box is Red, then will change to Green
    12. 'and set chkPaid value to "True" and refresh.
    13. If rec.BackColor = vbRed Then
    14.   rec.BackColor = vbGreen
    15.     Me![chkPaid].SetFocus
    16.     Me![chkPaid].Value = True
    17.       Me.Refresh
    18. Else
    19.  'If the 1st Bills "Paid" Box is Green, then will change to Red
    20.  'and set chkPaid value to "False" and refresh.
    21.   rec.BackColor = vbRed
    22.     Me![chkPaid].SetFocus
    23.     Me![chkPaid].Value = False
    24.       Me.Refresh
    25. End If
    26. End Sub
  4. As always, any problems please feel free to ask.
Nov 17 '07 #10
ADezii
8,834 Recognized Expert Expert
Wow, you are a mad scientist! Great idea... :) That idea actually works pretty good. The only thing is... well, check this out...



...in the code you set the declaration for the list.index in the code to "0", which makes this NOT possible to use on all the boxes? Now I have tried adding a field to your Sub() like this...

Expand|Select|Wrap|Line Numbers
  1. Private Sub FormatRectangles(rec As Rectangle, lst As ListBox, ind as index)
...But that doesn't work either. As far as I can tell, if the code does NOT select the listbox and row before adding the check, it will not update the appropriate "paid" column... which obviously is a problem. Do you have any suggestions for getting around this? In the mean time... trust me I am working very hard to resolve this problem on my own as well... It just takes me LOADS of time being that I am a newb! :)

Thanks again, your suggestion to get around my last problem proved to be quite useful in other areas as well... I really appreciate you ALL who spend time here helping others, it speaks volumes to your characters! God Bless.
If I interpret you correctly, the Numeric Value at the end of the Rectangle Field Name should coincide with the Numbered Row in the associated List Box. If you are passing Rectangle2 and lst1stBills to the FormatRectangles() Sub Procedure, then the 2nd item in lst1stBills should be selected:
Expand|Select|Wrap|Line Numbers
  1. Call FormatRectangles(Me![Rectangle2], Me![lst1stBills])
If this is your case, then this should point you in the right direction:
  1. Decorate a Private Variable named intRectangleID in your Form's Code Module.
    Expand|Select|Wrap|Line Numbers
    1. Private intRectangleID As Integer
  2. For each Rectangle, 'PRIOR' to making the call to FormatRectangles(), assign the proper value to intRectangleID. I'll stay with Rectangle2 as my example.
    Expand|Select|Wrap|Line Numbers
    1. Private Sub Rectangle2_DblClick(Cancel As Integer)
    2.   intRectangleID = 2       'Insert Unique Value for each Rectangle
    3.   Call FormatRectangles(Me![Rectangle2], Me![lst1stBills])
    4. End Sub
    5.  
  3. I showed the Routine in its entirety, but change only Line #9 to reflect the new Value for ListIndex in FormatRectangles().
    Expand|Select|Wrap|Line Numbers
    1. Private Sub FormatRectangles(rec As Rectangle, lst As ListBox)
    2. Const conBackStyleNormal As Integer = 1
    3.  
    4. 'Allows for color to show through
    5. rec.BackStyle = 1
    6.  
    7. 'Sets focus to 1st Bill List Box and selects line 0.
    8. lst.SetFocus
    9. lst.ListIndex = intRectangleID - 1        'ListIndex will now coincide with Rectangle#
    10.  
    11. 'If the 1st Bills "Paid" Box is Red, then will change to Green
    12. 'and set chkPaid value to "True" and refresh.
    13. If rec.BackColor = vbRed Then
    14.   rec.BackColor = vbGreen
    15.     Me![chkPaid].SetFocus
    16.     Me![chkPaid].Value = True
    17.       Me.Refresh
    18. Else
    19.  'If the 1st Bills "Paid" Box is Green, then will change to Red
    20.  'and set chkPaid value to "False" and refresh.
    21.   rec.BackColor = vbRed
    22.     Me![chkPaid].SetFocus
    23.     Me![chkPaid].Value = False
    24.       Me.Refresh
    25. End If
    26. End Sub
  4. As always, any problems please feel free to ask.
Nov 17 '07 #11
juengelj
12 New Member
[*] As always, any problems please feel free to ask.
Thank you very kindly ADezii... I will play around with this and let you know. :)
Nov 17 '07 #12
ADezii
8,834 Recognized Expert Expert
Thank you very kindly ADezii... I will play around with this and let you know. :)
You are quite welcome.
Nov 17 '07 #13

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

Similar topics

3
5691
by: Ian | last post by:
The beginning of my assembly that I am getting the access error from looks like this. ********************************* Imports System.EnterpriseServices Imports System Imports...
7
8823
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
1
2121
by: kathyk | last post by:
Hi, I created an application in MS Access 2000. Since upgrading to MS Access 2003 I have been finding all sorts of strange things. My current problem is with the function below. Ig get an error...
4
2709
by: Ron Vecchi | last post by:
I a runnning w2k3 pop3 mail server that came with iis6. I would like to write an application that progammtically creates the new mailboxes in an already established mail domain. Does anyone know...
3
2127
by: Dave Griffin | last post by:
I have what I think is an "unmanaged DLL" that I access from within C# using the construction: public static extern ushort sbs_init_device(ushort DevNum, ushort queue_length, ushort...
6
13693
by: Chad Crowder | last post by:
Getting the following error on my production server whether the file exists or not: "System.IO.IOException: Cannot create a file when that file already exists." Here's the code generating the...
9
2290
by: Marc Miller | last post by:
Hi all, I have 2 dev. machines, the 1st is Win 2000 with .NET 7.0 and the 2nd is XP Pro with .NET 2003. My Web Server is Win 2000 Server with IIS 5.0. I can create a new project on my test...
2
1643
by: Big Charles | last post by:
Hello, I would like to create an array-class to be able to call like: Dim oMyCar as New MyCar ' After initializing oMyCar, the object has to be like: oMyCar(0).Brand...
4
6876
by: Vlad | last post by:
I am having problems using the file.create method within a function that is called when looping through an array of filepaths. If I call my function with a hardcoded file path --C:\Temp.txt the...
5
4884
by: peter1234 | last post by:
Could you please confirm if 'Public Type', as defined below, is possible with Access 2003. Symilar example found in a book for Access 2007. Public Type TypeName Type as String Temp as Single ...
0
7252
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
7153
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7371
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
7517
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
5676
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,...
1
5077
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...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1583
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 ...
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.