اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

تعديل كود if للطباعة


ahmed_rashed

الردود الموصى بها

If Me.Option1.OptionValue = 1 Then
DoCmd.OpenReport "Print Form buy", acViewPreview
Else
Me.Option2.OptionValue = 2
DoCmd.OpenReport "Print Form RF", acViewPreview
Else
Me.Option3.OptionValue = 3
DoCmd.OpenReport "Print Form PRO", acViewPreview
End If
End If
End If
   اريد تعديل هذا الكود انه في حالة اختيار الاوبشن الاول يطبع  بيع والاوبشن التاني مرتجع وهكذا

 

print.JPG

رابط هذا التعليق
شارك

Dim RepName As String
'=================== اسم مجموعة الخيار
Select Case OptionName
Case 1
RepName = "Print Form buy"
Case 2
RepName = "Print Form Rf"
Case 3
RepName = "Print Form Pro"
End Select

    DoCmd.OpenReport RepName, acViewPreview
    

 

رابط هذا التعليق
شارك

استاذنا الوزير قام بالعمل المطلوب لكن لكي تعرف استخدام دالة If قمت بتعديل كودك السابق

If Me.Option1.OptionValue = 1 Then
	DoCmd.OpenReport "Print Form buy", acViewPreview
  ElseIf Me.Option2.OptionValue = 2 then
	DoCmd.OpenReport "Print Form RF", acViewPreview
  ElseIf Me.Option3.OptionValue = 3 then
	DoCmd.OpenReport "Print Form PRO", acViewPreview
End If

 

  • Like 1
رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information