open a blank form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am very new to Acess, however I am trying to pen a form in blank to add new
data. I did the query from 2 simple tables (StudyID, StudyName) FROM STUDIES
and (MediaBudget,TotalExpense) FROM MEDIA. I cannot open the form in blank, I
tried Update query, append, etc. Am I going to the worng way??HELP???Be easy
on me. SYL
 
Use this code to open your form...
DoCmd.OpenForm "frmYourFormName"
DoCmd.GoToRecord,, acNewRec
hth
Al Camp
 
Run the query without the form, go to the last record, see if you can add
records to the query, if you cant then there is no point of trying adding
data through the form.
Sometimes linking to tables in a query doesnt allow you adding another record.
If that the case replay if not then the open command should open the form to
add records
docmd.OpenForm "FormName",,,,acFormAdd
 
Thanks, worled very well.
Now a have anoher question: I have a form(from 1 tables)that shows
STUDYID
STUDYNAME
BUDGET
and a subform (from a table) that shows:
Mediaexpenseid
Studyname
Expenseamount.
I am triyng to habe a field that shows balance and totalexpenseamount,
should I do a combo box???
TIA
 
To get the total expense create a field and in the source of the field write

=[Mediaexpenseid]+[Expenseamount]
If the subform is a single form, that has only one data then you can create
a field on the form and the source of that field write
=[BUDGET]-nz(Forms![MainFormName]![SubFormName].Form![Mediaexpenseid] ) -
nz(Forms![MainFormName]![SubFormName].Form![Expenseamount] )

If the sub form is continues form, that has few records, then create in the
footer of the sub form two fields, to sum the expense, make the fields not
visible.
write in the source of each on of them
= sum([Mediaexpenseid])
=sum([Expenseamount])

create a field in the form like mentioned above but write in the source of
the field

=[BUDGET]-nz(Forms![MainFormName]![SubFormName].Form![SumOfMediaexpenseid] )
- nz(Forms![MainFormName]![SubFormName].Form![SumfExpenseamount] )
 
Txs, I did and I transformed my form into a table. My form is a single form
and subform a datasheet. TIA

Ofer said:
To get the total expense create a field and in the source of the field write

=[Mediaexpenseid]+[Expenseamount]
If the subform is a single form, that has only one data then you can create
a field on the form and the source of that field write
=[BUDGET]-nz(Forms![MainFormName]![SubFormName].Form![Mediaexpenseid] ) -
nz(Forms![MainFormName]![SubFormName].Form![Expenseamount] )

If the sub form is continues form, that has few records, then create in the
footer of the sub form two fields, to sum the expense, make the fields not
visible.
write in the source of each on of them
= sum([Mediaexpenseid])
=sum([Expenseamount])

create a field in the form like mentioned above but write in the source of
the field

=[BUDGET]-nz(Forms![MainFormName]![SubFormName].Form![SumOfMediaexpenseid] )
- nz(Forms![MainFormName]![SubFormName].Form![SumfExpenseamount] )


Savanah said:
Thanks, worled very well.
Now a have anoher question: I have a form(from 1 tables)that shows
STUDYID
STUDYNAME
BUDGET
and a subform (from a table) that shows:
Mediaexpenseid
Studyname
Expenseamount.
I am triyng to habe a field that shows balance and totalexpenseamount,
should I do a combo box???
TIA
 
Txs, the balance is not working, it is counting MEdiaexpenseID adding with
totalexpense and subtracting with budget.

Ofer said:
To get the total expense create a field and in the source of the field write

=[Mediaexpenseid]+[Expenseamount]
If the subform is a single form, that has only one data then you can create
a field on the form and the source of that field write
=[BUDGET]-nz(Forms![MainFormName]![SubFormName].Form![Mediaexpenseid] ) -
nz(Forms![MainFormName]![SubFormName].Form![Expenseamount] )

If the sub form is continues form, that has few records, then create in the
footer of the sub form two fields, to sum the expense, make the fields not
visible.
write in the source of each on of them
= sum([Mediaexpenseid])
=sum([Expenseamount])

create a field in the form like mentioned above but write in the source of
the field

=[BUDGET]-nz(Forms![MainFormName]![SubFormName].Form![SumOfMediaexpenseid] )
- nz(Forms![MainFormName]![SubFormName].Form![SumfExpenseamount] )


Savanah said:
Thanks, worled very well.
Now a have anoher question: I have a form(from 1 tables)that shows
STUDYID
STUDYNAME
BUDGET
and a subform (from a table) that shows:
Mediaexpenseid
Studyname
Expenseamount.
I am triyng to habe a field that shows balance and totalexpenseamount,
should I do a combo box???
TIA
 
I tried to change the syntax, had no luck. Why it is counting the
mediaexpenseid and adding with sumoftotal expense???The balance is not
correct. Please, what shoul I do?
 
is not giving the real total, is adding mediaexpenseid + totalexpenseamont
and giving me the wrong amount at the budget. Also I need the
totalexpenseamount showing at the bottom of the form I tried but also did not
work. I appreciated your help
Ofer said:
To get the total expense create a field and in the source of the field write

=[Mediaexpenseid]+[Expenseamount]
If the subform is a single form, that has only one data then you can create
a field on the form and the source of that field write
=[BUDGET]-nz(Forms![MainFormName]![SubFormName].Form![Mediaexpenseid] ) -
nz(Forms![MainFormName]![SubFormName].Form![Expenseamount] )

If the sub form is continues form, that has few records, then create in the
footer of the sub form two fields, to sum the expense, make the fields not
visible.
write in the source of each on of them
= sum([Mediaexpenseid])
=sum([Expenseamount])

create a field in the form like mentioned above but write in the source of
the field

=[BUDGET]-nz(Forms![MainFormName]![SubFormName].Form![SumOfMediaexpenseid] )
- nz(Forms![MainFormName]![SubFormName].Form![SumfExpenseamount] )


Savanah said:
Thanks, worled very well.
Now a have anoher question: I have a form(from 1 tables)that shows
STUDYID
STUDYNAME
BUDGET
and a subform (from a table) that shows:
Mediaexpenseid
Studyname
Expenseamount.
I am triyng to habe a field that shows balance and totalexpenseamount,
should I do a combo box???
TIA
 
What did you write in the sum field on the bottom of the sub form, and what
did you write in the field in the form.
can you please post the right syntax.
 
thanks for your help, on the bottom I wrote:
= sum([Mediaexpenseid])
=sum([Expenseamount])

And I created a field in the form like you mentioned and wrote in the source
of
the field

=[BUDGET]-nz(Forms![MainFormName]![SubFormName].Form![SumOfMediaexpenseid] )
- nz(Forms![MainFormName]![SubFormName].Form![SumfExpenseamount] )

also, I need to show the total amount of expense , I understood that this
field is on the fly, but how can I show on the form?(or subform)
Thanks
 
any response?

Savanah said:
thanks for your help, on the bottom I wrote:
= sum([Mediaexpenseid])
=sum([Expenseamount])

And I created a field in the form like you mentioned and wrote in the source
of
the field

=[BUDGET]-nz(Forms![MainFormName]![SubFormName].Form![SumOfMediaexpenseid] )
- nz(Forms![MainFormName]![SubFormName].Form![SumfExpenseamount] )

also, I need to show the total amount of expense , I understood that this
field is on the fly, but how can I show on the form?(or subform)
Thanks


Ofer said:
What did you write in the sum field on the bottom of the sub form, and what
did you write in the field in the form.
can you please post the right syntax.
 
I dont think its the case but when you use the nz function specify what value
you want to use to replace the null
=[BUDGET]-nz(Forms![MainFormName]![SubFormName].Form![SumOfMediaexpenseid]
,0)
- nz(Forms![MainFormName]![SubFormName].Form![SumfExpenseamount] ,0)

now - is it possible for you to mail the mdb, so I can look at it?

Savanah said:
thanks for your help, on the bottom I wrote:
= sum([Mediaexpenseid])
=sum([Expenseamount])

And I created a field in the form like you mentioned and wrote in the source
of
the field

=[BUDGET]-nz(Forms![MainFormName]![SubFormName].Form![SumOfMediaexpenseid] )
- nz(Forms![MainFormName]![SubFormName].Form![SumfExpenseamount] )

also, I need to show the total amount of expense , I understood that this
field is on the fly, but how can I show on the form?(or subform)
Thanks


Ofer said:
What did you write in the sum field on the bottom of the sub form, and what
did you write in the field in the form.
can you please post the right syntax.
 
thanks worked very well. Apreciated your attention


Ofer said:
I dont think its the case but when you use the nz function specify what value
you want to use to replace the null
=[BUDGET]-nz(Forms![MainFormName]![SubFormName].Form![SumOfMediaexpenseid]
,0)
- nz(Forms![MainFormName]![SubFormName].Form![SumfExpenseamount] ,0)

now - is it possible for you to mail the mdb, so I can look at it?

Savanah said:
thanks for your help, on the bottom I wrote:
= sum([Mediaexpenseid])
=sum([Expenseamount])

And I created a field in the form like you mentioned and wrote in the source
of
the field

=[BUDGET]-nz(Forms![MainFormName]![SubFormName].Form![SumOfMediaexpenseid] )
- nz(Forms![MainFormName]![SubFormName].Form![SumfExpenseamount] )

also, I need to show the total amount of expense , I understood that this
field is on the fly, but how can I show on the form?(or subform)
Thanks


Ofer said:
What did you write in the sum field on the bottom of the sub form, and what
did you write in the field in the form.
can you please post the right syntax.

:

Could someone help me with this matter?? Thanks so much.

:

I tried to change the syntax, had no luck. Why it is counting the
mediaexpenseid and adding with sumoftotal expense???The balance is not
correct. Please, what shoul I do?

:

Run the query without the form, go to the last record, see if you can add
records to the query, if you cant then there is no point of trying adding
data through the form.
Sometimes linking to tables in a query doesnt allow you adding another record.
If that the case replay if not then the open command should open the form to
add records
docmd.OpenForm "FormName",,,,acFormAdd

:

I am very new to Acess, however I am trying to pen a form in blank to add new
data. I did the query from 2 simple tables (StudyID, StudyName) FROM STUDIES
and (MediaBudget,TotalExpense) FROM MEDIA. I cannot open the form in blank, I
tried Update query, append, etc. Am I going to the worng way??HELP???Be easy
on me. SYL
 
Back
Top