David Pownall, 48, of Broad Oak Green, Penwortham, is accused of pocketing the cash from rentals of flats that his employers believed were empty between January 2013 and February 2018 - thought to amount to more than £100,000.
He worked for BPS Developments Ltd, who own accommodation at Glover’s Court and Brunel Court in Preston.
Wife Laura Pownall, 36, is accused of laundering cash through her bank accounts.
They are on trial at Preston Crown Court.
Jeremy Grout-Smith, prosecuting, said a maintenance manager found there were a number of flats occupied - that BPS had no idea about - during a fire risk assessment.
He said: “He (Pownall) claims he was a successful gambler and that someone else must have taken the missing money from BPS Developments.”
Giving evidence, an ex colleague told jurors an incriminating message from a ‘tenant’ was found on his open Facebook page after a disciplinary hearing.
The messenger conversation was discovered on the open web page on Pownall's account, expressing concern at his departure and asking: " What should I tell them?"
The pair then arranged to meet.
It is alleged most of the cash paid to David Pownall has gone into Laura Pownall’s accounts.
Police described several payments into her accounts as “unattributed credits”.
Jurors were previously shown a breakdown of the couple’s apparent income for each year since 2013 - against their household expenditure and general expenditure.
The prosecution say there are deficits of more than £20,000 each year when assessing the difference between their attributed income and net expenditure.
Mr Grout-Smith says: “That money must have come from somewhere because they’ve paid their obligations. The money’s come from somewhere - not of course from him gambling because he’s losing money.”
Prosecutor says £87,400 was paid by one source to Pownall, but that their expenditure was more than £100,000.
Mr Grout-Smith says the jury can therefore conclude extra money has come from other rooms at Glover’s Court that have been let out without authorisation.
He added: “We have to look at the defendants’ bank accounts because BPS, of course, have no idea how many tenants there have been unauthorised, so they don’t know how much money they’ve lost.
“But the level of loss is indicted by what’s been paid into the defendants’ bank accounts.”
The court is told there seems to be a “pattern” in that whenever the account seems to be overdrawn, a payment for “£1,000 or so comes along and puts it back into credit.” When interviewed by police, David Pownall gave a prepared statement.
It said BPS were aware of all the tenants and the cash takings were collected by the managing director, the man who found him out and his predecessor.
He then answered no comment.
The court was previously told an online account with bookmakers William Hill show Pownall deposited £126,000 and withdrew £56,000 - a loss of £70,059.
He closed the account in April 2016 but opened another, depositing £43,000 and withdrawing £12,280 - a loss of £30,722.