Full Version: Help getting the variable information on DoCmd.OpenForm
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
Miguel_A
Hi people.
Hi have a form, and inside that form i have several buttons to call other forms.
That other forms have to call several tables and have to call a specific information using one filed common on all tables the field "Interno".

Private Sub BuDaFami_Click()
Dim IntNum As String
IntNum = [Form_Ficha Nova].Interno.Value
DoCmd.OpenForm "Dados Familiares", acNormal, "[Interno] = 'IntNum'"
End Sub

When i click on de button names "BuDaFami" this will open other form with will show others information about the current user on the primary form. But code is not calling the value InrNum.
How can i put the variable in the DoCmd code to open the form that jave the value "IntNum" on the field "[Interno]" ??

Thanks for your help and for this excelent forum about the microsoft office.
dannyseager
try another comma

DoCmd.OpenForm "Dados Familiares",,, "[Interno] = 'IntNum'"
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.