P.manidas 39 Posting Whiz in Training

Dear all,

Thank you for guiding me in such a way which has given me some information in this subject.

Thank you.

P.manidas 39 Posting Whiz in Training

hai
please any body can give me code how to insert one row in already prepared table in ms access

Hi regalla_c,

Try these SQL codes. Hope these codes will help you.

'declaration
Option Explicit
Dim DB As Database
Dim S As String

Private Sub Form_Load()
Set DB = OpenDatabase(App.Path + "\Gbusiness.mdb")
End Sub

Private Sub CmdAdd_Click()
'Adding new record
S = "Insert into TeamAddress (slno, Name, Address) values("
S = S + "'" + Text1.Text + "'" + ","
S = S + "'" + Text2.Text + "'" + ","
S = S + "'" + Text3.Text + "'" + ")"
DB.Execute (S)
End Sub
P.manidas 39 Posting Whiz in Training

Dear Sir/Madam,

I have developed a software on game using VB 6.0 and Access, and I want to make that software as a Register Version. The software may ask the user for registration key at the time of installation or after specified period of time being installed.

I can make that software as ..
1) Software will ask for a registration key after 15 days (Specified Days) or after run/used by the user 15 times, keeping the value on database or in a control like textbox for comparing.

Here I want to know, will it be good practice to keep that comparing data on database or I have to keep that data somewhere else? Which will be the safe practice for future? If somewhere else how?

And I have no idea on how to make software which is asking for registration key at the time of installation. Please guide me.

P.manidas 39 Posting Whiz in Training

Dear all Sir/Madam,

Thank you for your valuable reply.

P.manidas 39 Posting Whiz in Training

Dear Sir/Madam,

As I have seen VB 6.0 is supporting Icon files, Metafiles and BMP files for using in the PictureBox property of ImageBox, PictureBox, and CommandButton.

I have tried ICON file to use on those Controls, but some ICON files are supported and some are not supported. So, I am confused, because all that files are ICON files.

I want to know, which format of ICON files are supported and which are not supported and how I will identify those ICON files?

Can we use PNG file in VB 6.0 ?

P.manidas 39 Posting Whiz in Training

Dear Kinwang2009/VBprgrmr,

Thanks for your soft copy Kinwang2009, which you had prepared for me.

Here i have attached both the programe which i prepare taking the solution code from both VBprgmr and Kinwang2009. Both the solution are good which meet the requirement of my programe. But i think vbprgrmr's solution is best.

Thank you All

P.manidas 39 Posting Whiz in Training

As kinwang2009 pointed out, the use of the msgbox function is called for here, but as you may be wanting to have a custom message box, you will need to show the form vbmodal and/or return a value from that form.

Load FrmMsgBox
FrmMsgBox.label1.caption=”Do you want to save the record?”
FrmMsgBox.Show vbModal, Me
If GblMsg = 1 Then Call SaveRecord

Then in FrmMsgBox you need to add Unload Me to each buttons click event AFTER you set your global variable...

Good Luck

Dear Vb5prgrmr,

Thank you very much for your suitable reply, which really solve my problem.

Thank you once again.

P.manidas 39 Posting Whiz in Training

Hi P.manidas,
I do believe that is possible but it require little effort. But I wonder why you choose not to use VB's MessageBox which is lot simple. The below code of VB's Message Box sereves the same purposes.

Private Sub Save_Click()
If MsgBox("Do you want to save the record?", vbYesNo) = vbYes Then
Call SaveRecord
Else
Exit Sub
End If
End Sub

If you really want in the manner you are asking now I will post my help later because now we have no power supply.

Thankx.

Dear Kinwang2009,

Thanks for your reply

Actually, i want a designable messagebox to be displayed, though i can design in a form so, i used the form as Messagebox in place of VB's MsgBox. Thanks once again and waiting for your reply as you have written.

P.manidas 39 Posting Whiz in Training

Dear Sir/Madam

I have a program where I have used a small form as Input / Message Box in place of VB’s InputBox / MsgBox in a click event procedure i.e CmdSave_Click(). Though the code lines are executing in that procedure at a time, the global variable GblBox is not getting the value 1 for executing SaveRecord procedure, which is passing by the FrmMsgBox(a form)’s CmdOK button.

So, can I hold/pause the code lines of Form1 from line no. 6 to 9 till passing the global variable’s value as like as InputBox. Or is there another way to solve. Please, help me to solve this problem. I am eagerly waiting for your reply.

Here are the Code lines

Codes of Form1

1. Private sub CmdSave_click()
2. Form1.enabled = False
3. Load FrmMsgBox
4. FrmMsgBox.visible = True
5. FrmMsgBox.label1.caption=”Do you want to save the record?”
6. If GblMsg=1 then
7. Call SaveRecord
8. End if
9. End Sub

10. Private Sub Form_Load()
11. GblMsg=0 ‘It is a Global variable
12. End Sub

Codes of FrmMsgBox

1. Private sub CmdOK_click()
2. GblMsg=1
3. End Sub

4. Private sub CmdCancel_click()
5. GblMsg=0
6. End Sub