Click here to Skip to main content
15,891,136 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionCreate a Data-Relation using Entities? Pin
nlarson1126-Jan-12 10:48
nlarson1126-Jan-12 10:48 
AnswerRe: Create a Data-Relation using Entities? Pin
Eddy Vluggen27-Jan-12 6:14
professionalEddy Vluggen27-Jan-12 6:14 
GeneralRe: Create a Data-Relation using Entities? Pin
nlarson1128-Jan-12 3:51
nlarson1128-Jan-12 3:51 
QuestionRun-time error '-2147217913 (80040e07)': Data type mismatch in criteria expression Pin
rizaky201125-Jan-12 18:55
rizaky201125-Jan-12 18:55 
AnswerRe: Run-time error '-2147217913 (80040e07)': Data type mismatch in criteria expression Pin
Dave Kreskowiak26-Jan-12 1:52
mveDave Kreskowiak26-Jan-12 1:52 
GeneralRe: Run-time error '-2147217913 (80040e07)': Data type mismatch in criteria expression Pin
rizaky201126-Jan-12 14:30
rizaky201126-Jan-12 14:30 
GeneralRe: Run-time error '-2147217913 (80040e07)': Data type mismatch in criteria expression Pin
Dave Kreskowiak26-Jan-12 16:00
mveDave Kreskowiak26-Jan-12 16:00 
GeneralRe: Run-time error '-2147217913 (80040e07)': Data type mismatch in criteria expression Pin
rizaky201129-Jan-12 19:06
rizaky201129-Jan-12 19:06 
the problem is the error only happen when the transaction form need to be appear, not happen to other form..

this is the transaction form code:
VB
Sub Cetakprinter() 'print the transaction form
Dim MGrs As String
Printer.Font = "Courier New"<code></code>
Printer.FontSize = "10"
'cari data gaji dengan nomor slip terakhir
Call BukaDB
RSGaji1.Open "select * from Gaji1 Where NomorSlp In(Select Max(NomorSlp)From Gaji1)Order By NomorSlp Desc", Conn
'cari data kasir yang kodenya ada di tabel gaji
RSKasir.Open "select * from kasir where kodeksr=" & RSGaji1!KodeKsr & "", Conn
RSKasir.Requery
'cari data pegawai yang nip-nya ada di tabel gaji
RSPegawai1.Open "select * from Pegawai1 where NIP=" & RSGaji1!NIP & "", Conn
RSPegawai1.Requery
Printer.Print
Printer.FontBold = True
'Printer.Print
Printer.FontBold = False
'cetak nomor slip,tanggal,nip dan seterusnya
Printer.CurrentX = 0
Printer.CurrentY = 0
'Printer.Print Tab(5); Image1.Picture = LoadPicture(logo_rs1.bmp)
Printer.Print Tab(15); "RSUD SARAS HUSADA "
'Printer.Print Tab(20); "SARAS HUSADA "
Printer.Print Tab(20); "PURWOREJO "
MGrs = String$(40, "=")
Printer.Print Tab(5); MGrs
'Printer.Print
Printer.Print
Printer.Print Tab(5); "Nomor Slip :  "; RSGaji1!NomorSlp
Printer.Print Tab(5); "Tanggal    :  "; Format(RSGaji1!Tanggal, "DD-MMMM-YYYY")
Printer.Print Tab(5); "NIP        :  "; RSGaji1!NIP
Printer.Print Tab(5); "Nama       :  "; RSPegawai1!NamaPgw
Printer.Print Tab(5); "Petugas    :  "; RSKasir!NamaKsr
MGrs = String$(40, "-")
'cetak isi tabel detailgaji berdasarkan nomor slip terakhir
Printer.Print Tab(5); MGrs
RSDetail.Open "select * from DetailGaji Where NomorSlp In(Select max(NomorSlp)From DetailGaji)", Conn
RSDetail.Requery
'If Not RSDetail.EOF Then
RSDetail.MoveFirst
Do While Not RSDetail.EOF
    'Call BukaDB
    Set RSPerkiraan1 = New ADODB.Recordset
    RSPerkiraan1.Open "select * from Perkiraan1 where KodePrk=" & RSDetail!KodePrk & "", Conn
    Printer.Print Tab(5); RSPerkiraan1!NamaPrk;
    If Left(RSDetail!KodePrk, 1) = "0" Then
        'jika satu digit awal kode perkirannya 0 maka beri tanda plus (+)
        Printer.Print Tab(25); RKanan(RSDetail!Jumlah, " Rp ###,###,### +")
    Else
        'jika satu digit awalnya kode perkiraannya 1 maka deri tanda minus (-)
        Printer.Print Tab(25); RKanan(RSDetail!Jumlah, " Rp ###,###,### -")
    End If
    RSDetail.MoveNext
Loop
'End If
Printer.Print Tab(5); MGrs
Printer.Print Tab(5); "Pendapatan :";
'cetak pendatapan
Printer.Print Tab(25); RKanan(RSGaji1!Pendapatan, " Rp ###,###,### +");
Printer.Print Tab(5); "Potongan   :";
'cetak potongan
Printer.Print Tab(25); RKanan(RSGaji1!Potongan, " Rp ###,###,### -");
Printer.Print Tab(5); MGrs
Printer.Print Tab(5); "Total      :";
'cetak totalnya (pendapatan -potongan)
If RSGaji1!Pendapatan = RSGaji1!Potongan Then
    Printer.Print Tab(34); RSGaji1!Pendapatan - RSGaji1!Potongan
Else
    Printer.Print Tab(25); RKanan(RSGaji1!Pendapatan - RSGaji1!Potongan, "Rp ###,###,### +");
End If
Printer.Print Tab(5); MGrs
Printer.Print
Printer.EndDoc
Printer.KillDoc
End Sub

thank you for your concern...
GeneralRe: Run-time error '-2147217913 (80040e07)': Data type mismatch in criteria expression Pin
Dave Kreskowiak30-Jan-12 2:01
mveDave Kreskowiak30-Jan-12 2:01 
GeneralRe: Run-time error '-2147217913 (80040e07)': Data type mismatch in criteria expression Pin
rizaky201130-Jan-12 14:02
rizaky201130-Jan-12 14:02 
GeneralRe: Run-time error '-2147217913 (80040e07)': Data type mismatch in criteria expression Pin
Dave Kreskowiak30-Jan-12 15:21
mveDave Kreskowiak30-Jan-12 15:21 
GeneralRe: Run-time error '-2147217913 (80040e07)': Data type mismatch in criteria expression Pin
rizaky201130-Jan-12 16:59
rizaky201130-Jan-12 16:59 
GeneralRe: Run-time error '-2147217913 (80040e07)': Data type mismatch in criteria expression Pin
Dave Kreskowiak30-Jan-12 18:04
mveDave Kreskowiak30-Jan-12 18:04 
GeneralRe: Run-time error '-2147217913 (80040e07)': Data type mismatch in criteria expression Pin
rizaky201131-Jan-12 17:02
rizaky201131-Jan-12 17:02 
GeneralRe: Run-time error '-2147217913 (80040e07)': Data type mismatch in criteria expression Pin
Dave Kreskowiak1-Feb-12 1:32
mveDave Kreskowiak1-Feb-12 1:32 
GeneralRe: Run-time error '-2147217913 (80040e07)': Data type mismatch in criteria expression Pin
rizaky20116-Feb-12 14:37
rizaky20116-Feb-12 14:37 
GeneralRe: Run-time error '-2147217913 (80040e07)': Data type mismatch in criteria expression Pin
Dave Kreskowiak6-Feb-12 16:43
mveDave Kreskowiak6-Feb-12 16:43 
GeneralRe: Run-time error '-2147217913 (80040e07)': Data type mismatch in criteria expression Pin
rizaky20116-Feb-12 17:39
rizaky20116-Feb-12 17:39 
GeneralRe: Run-time error '-2147217913 (80040e07)': Data type mismatch in criteria expression Pin
Dave Kreskowiak7-Feb-12 1:45
mveDave Kreskowiak7-Feb-12 1:45 
GeneralRe: Run-time error '-2147217913 (80040e07)': Data type mismatch in criteria expression Pin
rizaky20117-Feb-12 14:31
rizaky20117-Feb-12 14:31 
GeneralRe: Run-time error '-2147217913 (80040e07)': Data type mismatch in criteria expression Pin
Dave Kreskowiak7-Feb-12 15:10
mveDave Kreskowiak7-Feb-12 15:10 
AnswerRe: Run-time error '-2147217913 (80040e07)': Data type mismatch in criteria expression Pin
Bernhard Hiller26-Jan-12 21:03
Bernhard Hiller26-Jan-12 21:03 
GeneralRe: Run-time error '-2147217913 (80040e07)': Data type mismatch in criteria expression Pin
rizaky201129-Jan-12 19:08
rizaky201129-Jan-12 19:08 
QuestionTamper-proof service Pin
Brandon-X1200024-Jan-12 0:30
Brandon-X1200024-Jan-12 0:30 
AnswerRe: Tamper-proof service Pin
Eddy Vluggen24-Jan-12 5:10
professionalEddy Vluggen24-Jan-12 5:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.