hi,
thanks. now how can i know the result of an sql query whether the value is there or not. i want it to inform me if it does not find the value.
i hope i made myself clear on this.
aqm
hi,
thank you PGK. that´s extremely excellent. but iam not using DAO. Iam using ACCESS resources. is it possible with access only?
other question: is it possible to make information display on various forms at one query or select?
aqm
Hi,
If you can use DAO, then make the following modifications in the code I posted earlier.
Set db=CurrentDB
Set rs=db.OpenRecordset("Select * from DADO_PESSOAL where [DADO_PESSOAL].[NU_CONTRIBUINTE]='" & Me![NU_CONTRIBUINTE_FR] & "' and [DADO_PESSOAL].[FUN_CIF]= '9999999'"
If rs.RecordCOunt > 0 then
DoCmd.Close acForm,"FRR_Busca"
DoCmd.OpenForm "Filtro"
else
Msgbox "There are no records matching your criteria"
DoCmd.OpenForm "FRR_Busca"
End If
db.CLose
rs.CLose
Set db=Nothing
Set rs=Nothing
End SUb
You can set a refernce to the Microsoft DAO 3.6 Object Library using Tools->References in the Visual Basic Code Editor.
Note: In the above code, if the Field [DADO_PESSOAL].[FUN_CIF] is numeric, delete the single quotes around the 9999999. Hope it helps. Let me know what happens.
With regards,
PGK
hi,
this was excellent. please bear with me.
scenary:
I want to make a query that will display information of numerous employees on different forms that are bound together by tabs. if i select one employee, his information must be displayed on the various forms.
Regarding menus, Right click on the menu bar at the top->Customize->Tool Bars->New. Enter the name of the tool bar.
To place buttons on the toolbar, click on the Commands tab and drag and drop the command that you want on the newly created tool bar. All these dropped commands will retain their original functionality. Like new will open a new form.
To create your own functionality for buttons, Drag and Drop the Custom on your toolbar. Right this button on your toobar to set its properties. Hope it helps. Let me know what happens.
With regards,
PGK
HI,~
THANKS FOR YOUR ASSISTANCE.
HOW CAN I SYNCRONIZE THE A FORMS WITH A SUBFORM? BECAUSE WHEN I OPEN THE FORM AFTER HAVING SYNCRONIZED THE COMBO BOXES THROUGH THE FILTER ON THE QUERY, IT GIVES ME AN ERROR SAYING THAT I DID NOT USE A FILTER.
CAN U HELP? IS THERE ANY CODE FOR A FILTER, INSTEAD OF DOING IT THROUGH THE QUERY?
AQM
Hi,
I don't know anything about sub forms since I have never used them. So I suggest that you post this as a separate question in the forum. Hope it helps. Let me know what happens.
With regards,
PGK
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.